mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-01 15:59:08 +01:00
Merge pull request #27 from Retrospring/bug-image-constraints
Fix image sizes (thanks jpeg)
This commit is contained in:
commit
6b7a8a5073
1 changed files with 2 additions and 3 deletions
|
@ -16,12 +16,11 @@ module Paperclip
|
||||||
if target.cropping?
|
if target.cropping?
|
||||||
case @attachment.name
|
case @attachment.name
|
||||||
when :profile_picture
|
when :profile_picture
|
||||||
['-crop', "'#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}'"]
|
['-auto-orient', '-strip', '+repage', '-crop', "'#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}'"]
|
||||||
when :profile_header
|
when :profile_header
|
||||||
['-crop', "'#{target.crop_h_w.to_i}x#{target.crop_h_h.to_i}+#{target.crop_h_x.to_i}+#{target.crop_h_y.to_i}'"]
|
['-auto-orient', '-strip', '+repage', '-crop', "'#{target.crop_h_w.to_i}x#{target.crop_h_h.to_i}+#{target.crop_h_x.to_i}+#{target.crop_h_y.to_i}'"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue