Page 1 of 1

Best Way To Compress .PNG Image File?

Posted: 2018-09-01T22:44:59-07:00
by GlennIM
What is the best way to compress a .PNG format file that ImageMagicK creates to make the image file smaller in size?

ImageOptimizer optimizer = new ImageOptimizer();

optimizer.LosslessCompress(imageMod);

Or...

optimizer.Compress(imageMod);

Re: Best Way To Compress .PNG Image File?

Posted: 2018-09-02T04:39:09-07:00
by dlemstra
Compress will give you a better result but you might loose information from the file. If you only use the images in a website you should probably use the Compress method. But if you want to preserve the information from the original image you should use LosslessCompress instead. And make sure you also set the `OptimalCompression` property to true.