Guest User

Untitled

a guest
Jul 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. diff --git a/vendor/gems/paperclip-2.3.4/lib/paperclip/geometry.rb b/vendor/gems/paperclip-2.3.4/lib/paperclip/geometry.rb
  2. index 2aee324..55cecde 100644
  3. --- a/vendor/gems/paperclip-2.3.4/lib/paperclip/geometry.rb
  4. +++ b/vendor/gems/paperclip-2.3.4/lib/paperclip/geometry.rb
  5. @@ -16,8 +16,7 @@ module Paperclip
  6. def self.from_file file
  7. file = file.path if file.respond_to? "path"
  8. geometry = begin
  9. - # Paperclip.run("identify", "-format %wx%h :file", :file => "#{file}[0]")
  10. - Paperclip.run("gm identify", "-format %wx%h :file", :file => "#{file}[0]")
  11. + Paperclip.run("identify", "-format %wx%h :file", :file => "#{file}[0]")
  12. rescue PaperclipCommandLineError
  13. ""
  14. end
  15. diff --git a/vendor/gems/paperclip-2.3.4/lib/paperclip/thumbnail.rb b/vendor/gems/paperclip-2.3.4/lib/paperclip/thumbnail.rb
  16. index 9297545..a158cbd 100644
  17. --- a/vendor/gems/paperclip-2.3.4/lib/paperclip/thumbnail.rb
  18. +++ b/vendor/gems/paperclip-2.3.4/lib/paperclip/thumbnail.rb
  19. @@ -58,8 +58,7 @@ module Paperclip
  20.  
  21. parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
  22.  
  23. - # success = Paperclip.run("convert", parameters, :source => "#{File.expand_path(src.path)}[0]", :dest => File.expand_path(dst.path))
  24. - success = Paperclip.run("gm convert", parameters, :source => "#{File.expand_path(src.path)}[0]", :dest => File.expand_path(dst.path))
  25. + success = Paperclip.run("convert", parameters, :source => "#{File.expand_path(src.path)}[0]", :dest => File.expand_path(dst.path))
  26. rescue PaperclipCommandLineError => e
  27. raise PaperclipError, "There was an error processing the thumbnail for #{@basename}" if @whiny
  28. end
  29. @@ -73,8 +72,7 @@ module Paperclip
  30. scale, crop = @current_geometry.transformation_to(@target_geometry, crop?)
  31. trans = []
  32. trans << "-resize" << %["#{scale}"] unless scale.nil? || scale.empty?
  33. - # trans << "-crop" << %["#{crop}"] << "+repage" if crop
  34. - trans << "-crop" << %["#{crop}"] if crop
  35. + trans << "-crop" << %["#{crop}"] << "+repage" if crop
  36. trans
  37. end
  38. end
Add Comment
Please, Sign In to add comment