Fix image rotation #12
This commit is contained in:
parent
5274c8d8da
commit
a61b644e2c
2 changed files with 2 additions and 3 deletions
|
@ -41,7 +41,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
<div class="detail-image">
|
<div class="detail-image">
|
||||||
<a href="/images/raw/{{ image.hash }}.png">
|
<a href="/images/raw/{{ image.hash }}.png">
|
||||||
<img class="card-img-top" src="/images/raw/{{ image.hash }}.png" alt="{{ image.title }}"/>
|
<img class="card-img-top" src="/images/normal/{{ image.hash }}.png" alt="{{ image.title }}"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
["normal" "raw" "thumbnails"]))
|
["normal" "raw" "thumbnails"]))
|
||||||
|
|
||||||
(defn scale-thumbnail [width]
|
(defn scale-thumbnail [width]
|
||||||
#(let [image-file %
|
#(let [image-file % [orig-width orig-height] (dimensions (utils/buffered-image image-file))]
|
||||||
[orig-width orig-height] (dimensions (utils/buffered-image image-file))]
|
|
||||||
(if (< orig-width orig-height)
|
(if (< orig-width orig-height)
|
||||||
(let [resized-img (resize-to-width image-file width)
|
(let [resized-img (resize-to-width image-file width)
|
||||||
[w h] (dimensions resized-img)
|
[w h] (dimensions resized-img)
|
||||||
|
|
Loading…
Reference in a new issue