Observe the file size of an image before doing anything to it. Size: 262kb
Select the image and invoke the Edit function. Without doing anything save and Close. Size: 375kb
I expect the quality setting to affect file size.
The quality setting seems to have no effect.
PHP 8.011 Apache/2.4.51 Joomla! 4.1.0 Stable [ Kuamini ] 15-February-2022 09:30 GMT
I am writing some documentation and need to know whether this feature is actually working as intended. I was surprised to see file sizes increasing signiricantly on save.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
J4 Media Manager
|
it will probably depend on the original compression of the image
The quality then is confusing. If I store the image without doing something - means that when saving, the qualitiy is reduced to 80. This would explain a recution of size. If I open again, do nothing and save, the quality is again reduced to 80 and so on.
Looking through the javascript code it seems that the image quality setting should be between 0 and 1. But even with a value of 0.5 the processed image is larger in bytes than the original and any value between 0 and 1 does not change the saved image size significantly. I was rather expecting the quality value to affect the compression quality. See
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
media/plg_media-action_crop/js/crop.js (for example use of quality)
Something else I did not know: Save just writes out the image buffer to the file on disk. It does not use any of the php image manipulation functions.
All quite confusing.
Labels |
Added:
bug
|
I see the contrary - that the size of images is smaller than before after saving. But the input in Quality is not stored and remains 80.