jtescher / carrierwave-imageoptimizer

This gem allows you to simply optimize CarrierWave images via jpegoptim or optipng.
https://rubygems.org/gems/carrierwave-imageoptimizer
MIT License
212 stars 33 forks source link

Removing the call to manipulate! improves Jpeg compression performance. ... #1

Closed bmayes closed 11 years ago

bmayes commented 11 years ago

... The writing back by rmagick of the image after the compression step caused an increase in image size:

  write_block = create_info_block(options[:write])
  if options[:format]
    frames.write("#{options[:format]}:#{current_path}", &write_block)
  else
    frames.write(current_path, &write_block)
  end

It seems like PNGs are unaffected by this change This only improves Jpeg.