I'm trying to convert a fetched image from JPG to PNG using RMagick, resize it and then store it on S3:
thumb = Magick::Image.read("artist.jpg").first
thumb.write("artist.png")
thumb.crop_resized!(120, 120, Magick::CenterGravity)
AWS::S3::S3Object.store("image.png", thumb.to_blob, AWS_BUCKET, :content_type => 'image/png', :access => :public_read)
Try explicitly setting the format:
thumb = Magick::Image.read("artist.jpg").first
thumb.format = "PNG"
thumb.write("artist.png")
thumb.crop_resized!(120, 120, Magick::CenterGravity)
AWS::S3::S3Object.store("image.png", thumb.to_blob, AWS_BUCKET, :content_type => 'image/png', :access => :public_read)