-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
png compression choice, decreasing generated png size #824
Comments
My recommendation in such circumstances would be to: keep fast png compression, don't recompress anything, but rather generate thumbnails, and generate the HTML reports so that image point to the thumbnail, and href anchors to the full image. This provides IMO the best of all worlds:
See https://github.com/apitrace/apitrace/blob/master/scripts/snapdiff.py#L126-L152 for an example of how to achieve, which should be trivial to incorporate into piglit. If despite thumbnail use, the full images size is still an issue, I'm happy to accept a PR adding a CMake build option to choose the image compression level, or even a runtime option. Default should stay fast though.
FYI, this is trivial to achieve with ImageMagick:
When submitting reference images to a repos, there are other tools out there that can be used to compress PNG even further. But they tend to be very slow. |
Referring to commit 0d06c46 (2012).
For Mesa3D use, when piglit is invoked with
--keep-images
we dump one image per trace, which is usually then stored in CI and transferred to the developer computer (while browsing piglit summary). I wonder if it would make sense these days to use level 9 compression for PNG.When I locally generate a PNG image from 1440x720, let's say with the current option we have a 1.5M file, but when re-compressed with level 9, I get to 1.3MB, which could speed up loading images over the internet on weaker connections (also, developers usually compare changed images, so it's 2x image size).
Another options:
- recompress images after dumping them in Mesa3D CI
- patch apitrace build (currently only Linux) to have level 9 just for Mesa
The text was updated successfully, but these errors were encountered: