[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RMagick Setting JPEGCompression

TomRossi7

5/16/2007 5:38:00 PM

I am trying to dynamically set the compression or quality of an image
when displaying it. I have seen in the RMagick documentation how to
set the quality only when writing the file to disk. How can I set the
quality dynamically or set the compression?

The method "image.quality=" does not exist and
"image.compression_type=" is not in the documentation. I have tried
image.compression= Magick::CompressionType.new('JPEGCompression',50),
but that doesn't work.

Thanks!

--Tom

1 Answer

Tim Hunter

5/16/2007 10:00:00 PM

0

TomRossi7 wrote:
> I am trying to dynamically set the compression or quality of an image
> when displaying it. I have seen in the RMagick documentation how to
> set the quality only when writing the file to disk. How can I set the
> quality dynamically or set the compression?
>
You can't. The only time you can specify the compression level is as an
optional argument to Image#write or Image#to_blob.

--
RMagick [http://rmagick.rub...]
RMagick Installation FAQ [http://rmagick.rub.../install-faq.html]