eltiare / carrierwave-vips

CarrierWave image processing powered by VIPS
MIT License
92 stars 39 forks source link

Quality method did not work. Now fixed #15

Closed cgat closed 11 years ago

cgat commented 11 years ago

The quality method was checking if image responded to :quality=, which will always fail. As far as I can see, VIPS::Image contains no quality method (VIPS::JPEGWriter seems to have a quality method, but no quality=). Quality is now set via the writer format options instance variable (@_format_opts). Currently, it assumes that the only format to accept quality is jpeg, checking that either the original file format or conversion format are jpeg before setting the format options variable.

cgat commented 11 years ago

I should also mention that the default quality when saving to jpeg is 75, which may be a bit low as the default (at least in my cases, the jpeg artifacts were fairly obvious).

eltiare commented 11 years ago

Thanks! I just made it so that it will run on Ruby 1.8 and pass the Travis builds.

cgat commented 11 years ago

No problem. Thanks for creating this gem!