Changeset View
Changeset View
Standalone View
Standalone View
tests/integration/test_png.py
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | def test_transparent(self): | ||||
400, | 400, | ||||
300, | 300, | ||||
# WebP compresses the alpha layer more agressively by default, which results in this | # WebP compresses the alpha layer more agressively by default, which results in this | ||||
# low score. This can be avoided in webp >= 0.5 with the -exact function, currently | # low score. This can be avoided in webp >= 0.5 with the -exact function, currently | ||||
# only available on Debian Stretch. | # only available on Debian Stretch. | ||||
0.23, | 0.23, | ||||
0.68 | 0.68 | ||||
) | ) | ||||
# Palette PNG | |||||
self.run_and_check_ssim_and_size( | |||||
'thumbor/unsafe/400x/' + | |||||
'Cincinnati_Bell_logo.png', | |||||
'400px-Cincinnati_Bell_logo.png', | |||||
'400px-Cincinnati_Bell_logo.png', | |||||
400, | |||||
86, | |||||
# Likely due to differences compressing the transparency layer between IM versions | |||||
0.75, | |||||
# The thumbnail is bigger because ImageMagick either messes with the palette if we ask it | |||||
# to generate a palette PNG via the PNG8 output, making the image ugly and aliased (but small) | |||||
# or, as it does automatically here, converts the output to an RGBA image and conserves fidelity | |||||
1.13 | |||||
) |
Content licensed under Creative Commons Attribution-ShareAlike 3.0 (CC-BY-SA) unless otherwise noted; code licensed under GNU General Public License (GPL) or other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL