Permalink
Browse files

Adapted jcropper to work with Paperclip::Thumbnail after this commit: h…

  • Loading branch information...
1 parent 06375bc commit 52e11034873b750081f51afce75067df3289a7d2 @andion andion committed Sep 30, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/paperclip_processors/jcropper.rb
@@ -9,7 +9,7 @@ class Jcropper < Thumbnail
def transformation_command
if crop_command
- crop_command + super.sub(/ -crop \S+/, '')
+ crop_command + super.join(' ').sub(/ -crop \S+/, '').split(' ')
else
super
end
@@ -18,7 +18,7 @@ def transformation_command
def crop_command
target = @attachment.instance
if target.cropping?
- " -crop '#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}'"
+ ["-crop","#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}"]
end
end

0 comments on commit 52e1103

Please sign in to comment.