Question

I'm completely new to image processing in ASP.NET. I am very familiar with Photoshop, and image magick to some degree.

I am trying to figure out what the difference is between Quality and Compression as other apps tend to treat them as the same. With system.drawing.imaging there's settings for Quality and Compression.

http://msdn.microsoft.com/en-us/library/system.drawing.imaging.encoder.quality.aspx reads: "The Quality category specifies the level of compression for an image."

http://msdn.microsoft.com/en-us/library/bb882583.aspx reads: "A quality level of 0 corresponds to the greatest compression, and a quality level of 100 corresponds to the least compression."

The documentation seems to use Quality and Compression interchangeably. However, there's settings for each. What's the difference?

Was it helpful?

Solution

The Quality encoder parameter has values from from 0-100 that will dictate the amount of compression that can be applied for certain encoders, 0 for maximum compresssion, and 100 for minimum compression.

The Compression encoder parameter specifes the type of compression applied for certain encoders. The value of this depends on the codec, but a (theoretical) GIF encoder might have VersionGif87 or VersionGif89 as possible values.

OTHER TIPS

The quality encoding parameter is what you would expect, and have quoted a value from 0-100 which tells the processor what quality you want your image to be saved at. The Compression parameter defines the type of compression the encoder will use. Here are all the valid compression types: http://msdn.microsoft.com/en-us/library/system.drawing.imaging.encodervalue.aspx

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top