-
Bug
-
Resolution: Fixed
-
Neutral
-
3.5.3
-
None
-
Empty show more show less
-
Yes
-
DevX 21, DevX 22
-
2
Steps to reproduce
- Â Follow steps in below link to create the image operation: https://docs.magnolia-cms.com/product-docs/6.2/Developing/Templating/Theme.html#_image_variations
- Â Upload original JPG image
- Set output format as PNG
- Set output format > quality as 20
.. Logs, screenshots, gifs...
Expected results
- According to https://docs.magnolia-cms.com/product-docs/6.2/Modules/List-of-modules/Imaging-module.html#_output_format
- An image with 20% quality should be generated
.. Justify non-trivial expectations with a link to a doc or a relevant discussion.
Actual results
- No very different images were generated if we set values in range 0-100
Workaround
- PNG currently being a special case due to our calculation, image quality floating around 5 to 9 according to its compression level. This also depends on our PNG library in used.
Development notes
- Compression level being set in info.magnolia.imaging.DefaultImageStreamer.writePngWithCompression(BufferedImage, OutputStream, OutputFormat)
PngWriter pngw = new PngWriter(os, imi); int quality = outputFormat.getQuality(); pngw.setCompLevel(Math.max(9 - quality, 5));
The calculation shown that just in very narrow range PNG image quality could be in used.
Acceptance criteria
- is depended upon by
-
MTE-146 Wrong outputFormat resolver lead to wrong image format generation
- Closed
1.
|
Implementation | Completed | Marek Strucka | |
2.
|
Review | Completed | Dai Ha | |
3.
|
PiQA | Completed | Dai Ha | |
4.
|
QA | Completed | Jaroslav Simak | |
5.
|
Docu | Closed | Martin DrĂ¡pela | |
6.
|
QA | Completed | Milan Divilek |