Don't scale small images #14
This commit is contained in:
parent
34d724292b
commit
68ee12d2cf
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@
|
||||||
(crop-from resized-img crop-margin 0 width width)))))
|
(crop-from resized-img crop-margin 0 width width)))))
|
||||||
|
|
||||||
(defn scale-normal [width height]
|
(defn scale-normal [width height]
|
||||||
(resize-fn width height ultra-quality))
|
#(let [image-file % [orig-width orig-height] (dimensions (utils/buffered-image image-file))]
|
||||||
|
(if (and (< orig-width width) (< orig-height height))
|
||||||
|
((resize-fn orig-width orig-height ultra-quality) %)
|
||||||
|
((resize-fn width height ultra-quality) %))))
|
||||||
|
|
||||||
(defn remove-metadata [filepath file]
|
(defn remove-metadata [filepath file]
|
||||||
(if (contains? #{".jpg" ".jpeg" ".jpe"} (s/lower-case (fs/extension filepath)))
|
(if (contains? #{".jpg" ".jpeg" ".jpe"} (s/lower-case (fs/extension filepath)))
|
||||||
|
|
Loading…
Reference in a new issue