I have the following code, which resizes and image and then adds some hex background. On localhost this works, but on heroku i get the following error
version :big do
process :offer_resize_and_pad
end
def offer_resize_and_pad
img = resize_and_pad(600, nil, model.hex, 'Center')
img
end
"Photo Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: Command (\"mogrify -thumbnail \"600x>\" -background \"#fff\" -gravity \"Center\" -extent \"600x\" /tmp/mini_magick20130217-2-1hts61y.jpg\") failed: {:status_code=>1, :output=>\"mogrify: Empty JPEG image (DNL not supported)
/tmp/mini_magick20130217-2-1hts61y.jpg' @ jpeg.c/EmitMessage/232.\n\"
I 've used RMagick instead of Mini_magick, with some syntax changes , and it seems to work :) .
include CarrierWave::RMagick
def offer_resize_and_pad
img = resize_and_pad(600, 280, model.hex, ::Magick::CenterGravity)
img
end