Jump to content
Sign in to follow this  
LaMMA

Option to losslessly minify JPG, PNG and GIF when exporting

Recommended Posts

I would love to see an option when saving JPG, PNG and GIF files to losslessly compress them and remove unnecessary junk in order to achieve minimal file size :) ...

Something like ImageOptim does (with tools like PNGCrush, MozJPEG, Zopfli, AdvPNG, Jpegoptim, Gifsicle, SVGO and PNGOUT).

 

And bonus: Images that are used as Resources in Affinity Photo and Designer can be losslessly minified as well (in affinity photo there was saving 10MB from 51MB = 20% on my test run)

Share this post


Link to post
Share on other sites

I would love to see an option when saving JPG, PNG and GIF files to losslessly compress them and remove unnecessary junk in order to achieve minimal file size

Hi,

 

I second that request. Lossless file size optimization (e.g. by multi-pass compression) is very useful for lowering the bandwidth requirements of Websites and application resources. It's better to spend extra time compressing an image once, than losing time and bandwidth each time after that when an image is viewed.

 

One could even consider optional lossy compression, e.g. 4:4:4 vs 4:2:2 vs 4:1:1 or other chroma-subsampling schemes.

 

Stripping of meta-data is a separate issue, and should be handled with care, because it can e.g. affect/alter how images are viewed in (non-)color managed applications, and on Wide gamut displays.

 

It will require some additional 'Expert' or 'Advanced' options in the export dialogs, and knowledge on the part of the users, but IMHO it's worthwhile (because I now have to do it with a separate application for each final image).

 

Cheers,

Bart

Share this post


Link to post
Share on other sites

While I agree that more export options would be welcome -- in particular webp export -- I don't think it would outperform dedicated tools. In my experience with Photoshop's newer export options these always result in lossless images that are bigger in file size.

 

My current workflow is exporting PNG files at full quality, and then run them through Color Quantizer one by one, choosing custom settings for each (or a group of files) file. The beautiful thing in CQ is that a quality mask brush allows for very controlled optimization. Nothing else (automated) comes close. I am 100% certain Affinity would not be able to match the quality and small file size compared to CQ even if automated lossless file optimization would be integrated.

 

Besides, Affinity lacks proper scale-down resampling algorithms (Catmull-Rom, Mitchel-netravali to name but a few) that result in smaller file sizes compared to Lanczos (which introduces more data than needed in scaled-down resampled images). That ought to be resolved as well. I do this in CQ as well (which offers 16(!) different resampling algorithms).

 

These two shortcomings in most (if not all) image editors will always result in larger-than-needed image file sizes.

Share this post


Link to post
Share on other sites
[...]

Besides, Affinity lacks proper scale-down resampling algorithms (Catmull-Rom, Mitchel-netravali to name but a few) that result in smaller file sizes compared to Lanczos (which introduces more data than needed in scaled-down resampled images). That ought to be resolved as well. I do this in CQ as well (which offers 16(!) different resampling algorithms).

 

These two shortcomings in most (if not all) image editors will always result in larger-than-needed image file sizes.

Hi,

 

Lanczos just has different trade-offs than Catmull-Rom or Mitchel-Netravali filters (or those using other Keys family filter parameters). None of them are 'proper', they just have different trade-offs. However, the ringing of Lanczos 3 (which BTW would be virtually gone with Lanczos 2, if that were to be available), can be mitigated by using a slight pre-blur (with e.g. a Gaussian blur radius of 0.25 to 0.30 times the downsampling factor) before downsampling. A down-sampling by e.g. a factor of 5, would benefit from a pre-blur of 5 x 0.25 = radius 1.25, or slightly more lossy 5 x 0.3 = 1.5.

 

This type of pre-blur is a bit suboptimal compared to what could be achieved with much more elaborate algorithms, e.g. including the use of gamma, but it is very effective if image compression is important. It will not lose much significant detail, but it will improve the achievable lossless compression because it also suppresses the aliasing artifacts that are common with downsampling.

 

Cheers,

Bart

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.