Fix image rotation #12

This commit is contained in:
Aaron Fischer 2017-04-03 22:05:50 +02:00
parent 5274c8d8da
commit a61b644e2c
2 changed files with 2 additions and 3 deletions

View file

@ -41,7 +41,7 @@
<hr>
<div class="detail-image">
<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>
</div>
<hr>

View file

@ -33,8 +33,7 @@
["normal" "raw" "thumbnails"]))
(defn scale-thumbnail [width]
#(let [image-file %
[orig-width orig-height] (dimensions (utils/buffered-image image-file))]
#(let [image-file % [orig-width orig-height] (dimensions (utils/buffered-image image-file))]
(if (< orig-width orig-height)
(let [resized-img (resize-to-width image-file width)
[w h] (dimensions resized-img)