Skip to content
Browse files

Fix problem where resize to fill would remove the background of a png…

… and replace it with the default background color.
  • Loading branch information...
1 parent 789a8b9 commit f7a67b8b668282ae4f1752c52895dfa7f512a030 @Hakon committed Mar 7, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/carrierwave/processing/mini_magick.rb
View
1 lib/carrierwave/processing/mini_magick.rb
@@ -175,6 +175,7 @@ def resize_to_fill(width, height, gravity = 'Center')
cmd.resize "#{cols}x#{rows}"
end
cmd.gravity gravity
+ cmd.background "rgba(255,255,255,0.0)"
cmd.extent "#{width}x#{height}" if cols != width || rows != height
end
img = yield(img) if block_given?

0 comments on commit f7a67b8

Please sign in to comment.
Something went wrong with that request. Please try again.