Optimize PNG images using ImageOptim
This PR reduces the file size of PNGs in the following directories:
/data/backgrounds/
/data/themes/classic/
/data/themes/default/
I used the ImageOptim app to compress the PNG file size in a lossless way.
By compressing the PNG images my hope is that additional system resources will be freed to do other awesome things with LMMS.
Update:
I meant to include these ImageOptim screenshots when creating the PR:
Savings for /data/themes/classic
Savings for /data/themes/default
@tresf is this something we should be doing?
@tresf is this something we should be doing?
Ideally, yes. Most of what ImageOptim removes is metadata, which we're fine with. It also uses various other optimization methods to reduce size without any loss of pixel data. It should probably be the standard for PNG resources moving forward.
https://imageoptim.com/
I took a cursory look at the PR and I didn't see anything wrong with it. Images look identical as before with the advantage of slightly smaller file size. I'm curious how much this adds up to overall in our desktop installers.
With regards to freeing system resources claims, this is likely untrue for LMMS due to how pixmap data is loaded into memory in Qt, but if there's no downside, I would say it's worth merging.
How does ImageOptim compare to other lossless PNG compressors? Last time I looked into it ZopfliPNG was the best tool I could find, but that was a while ago so maybe there are newer and better options.
How does ImageOptim compare to other lossless PNG compressors? Last time I looked into it ZopfliPNG was the best tool I could find, but that was a while ago so maybe there are newer and better options.
I'm not sure about the latest and greatest PNG compression technology. ImageOptim is what I had used in the past so that's what I went with. Thanks for pointing out that there may be better options.
With regards to freeing system resources claims, this is likely untrue for LMMS due to how pixmap data is loaded into memory in Qt, but if there's no downside, I would say it's worth merging.
I am brand new to Qt and LMMS development. Thank you for sharing knowledge about how pixmaps work.
There should be no downside to this change as the compression is supposed to be lossless.
I meant to include these ImageOptim screenshots when creating the PR
Right, so we'll shrink the packages about 0.25 - 0.5 MB. This is not very significant savings (our installers average 40MB - 100MB depending on the platform/compression), but I do not see any downsides.
Do we have a way to ensure this is done to any future artwork? It would be a shame if this work were omitted from future themes, or even reverted when modifying existing themes.
Do we have a way to ensure this is done to any future artwork?
Due to efforts to migrate assets to SVG (#7767 relevant) I'm not sure this should be a concern moving forward.
I looked through about 350 of the images (stuff that isn't a white icon on a transparent background) and I see no tomfoolery here. Approving
I've never dealt with a git conflict with a png before, so I checked the commit log for data/themes and didn't see any commits that this would revert. The closet was a change to the faders that came in a few months prior. Merging.