1

I am trying to convert a JPEG image into progressive JPEG image. I am using following code in console.

require 'rmagick'

i = Magick::Image.read("test.jpg")[0]

puts i.interlace # => NoInterlace
i.write("test2.jpg") { self.interlace = Magick::PlaneInterlace }

puts i.interlace # => PlaneInterlace

My problem is when I upload this local instance of image to AWS using this pice of code

AWS::S3::S3Object.store("test2.jpg", thumb.to_blob, AWS_BUCKET, :content_type => 'image/png', :access => :public_read)

And when I am trying to open this image in browser its not getting converted in progressive JPEG image.

Please help me how I can work with it.

4

0 回答 0