Page 1 of 1

Help me with JPEG settings

Posted: 2013-02-27T06:03:25-07:00
by idanshechter
I am using http://imagemagick.codeplex.com/ in my asp.net project.

I am resizing and saving JPEG images exported from Photoshop and upload them to a CDN after doing as follows:

testimage.Compression = CompressionType.JPEGCompression;
testimage.Filter = FilterType.LanczosFilter;
testimage.Quality = compressionLevel; // set to 85
testimage.Write(imagestream, "jpg");

I wanted to know what is the best settings to use for JPEG compression ,which filter I should use?

In general, When I export the JPEG from Photoshop with 80% quality, I get a lower quality compare to if I use imagemagick with 80% quality.

Can you help me with this. Thanks.

Re: Help me with JPEG settings

Posted: 2013-02-27T11:01:29-07:00
by fmw42
I do not believe that the filter setting affects simple compression. It is used when resizing WxH. Quality settings are different for each system, because each system may have different compressions codes. PS has specially tuned codes so compress smaller. I expect you will have to experiment with IM to achieve the same size output as you do with PS.

Of interest may be this topic -- viewtopic.php?f=22&t=22808

Re: Help me with JPEG settings

Posted: 2013-02-27T11:04:19-07:00
by idanshechter
Thanks for your reply,

What is IM, and what options have direct affect on the image quality of the jpeg?

Thanks.

Re: Help me with JPEG settings

Posted: 2013-02-27T11:17:20-07:00
by fmw42
IM is Imagemagick abbreviation. The only factors that I know are -quality and -sampling-factor. See
http://www.imagemagick.org/script/comma ... hp#quality
http://www.imagemagick.org/script/comma ... ing-factor