Help me with JPEG settings

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
idanshechter
Posts: 3
Joined: 2013-02-27T05:58:57-07:00
Authentication code: 6789

Help me with JPEG settings

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help me with JPEG settings

Post 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
idanshechter
Posts: 3
Joined: 2013-02-27T05:58:57-07:00
Authentication code: 6789

Re: Help me with JPEG settings

Post by idanshechter »

Thanks for your reply,

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

Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help me with JPEG settings

Post 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
Post Reply