Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.14
-
None
-
17cc497f16ea5e2d722db422e2c6611e107f62a8 (qt/qtquickcontrols2/5.13)
Description
The libqtquickcontrols2imaginestyleplugin.so (or dll, etc.) is ~2MB big. The 1288 images in qtquickcontrols2/src/imports/controls/imagine/images take ~1.5MB.
Just by compressing the png files via optipng -o 7 -strip all, the 1288 images shrink to ~0.8MB.
Example of how a png can losslessly shrink:
c:\Users\alportal\dev\qt5\qtquickcontrols2\src\imports\controls\imagine\images>optipng -o 7 -strip all tooltip-background@4x.9.png ** Processing: tooltip-background@4x.9.png 102x126 pixels, 4x8 bits/pixel, RGB+alpha Reducing image to 8 bits/pixel, 20 colors (18 transparent) in palette Stripping metadata... Input IDAT size = 1442 bytes Input file size = 1515 bytes Trying: zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 257 zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 257 zc = 9 zm = 9 zs = 1 f = 0 IDAT size = 256 zc = 9 zm = 8 zs = 1 f = 0 IDAT size = 256 Selecting parameters: zc = 9 zm = 8 zs = 1 f = 0 IDAT size = 256 Output IDAT size = 256 bytes (1186 bytes decrease) Output file size = 415 bytes (1100 bytes = 72.61% decrease)
Those ~0.7MB difference would also apply to the libqtquickcontrols2imaginestyleplugin.so, since the png files are included as resources.
Attachments
For Gerrit Dashboard: QTBUG-79275 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
277998,3 | Run optipng on all images | 5.13 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |