Closed sebasdrk17 closed 1 year ago
Hello @moylop260 could you give me a technical review here please?
More context here
@oscarolar patch related to MR#2530
@moylop260 could you review again please?
@luisg123v what's the reason for closing this pull?
@oscarolar,
All branches targeting 12.0 and older were removed.
If you're using this as a patch, take into account the PRs don't need to be opened for patches to work. And since the 12.0 branch won't be updated anymore, there's no conflict risk.
If you really need this to be opened, it may be re-opened without troubles.
Thanks, I just needed the reason.
@luisg123v
Use as a patch.
Issue
The main issue is that when the resize is made, it creates a new image, resulting in the loss of the original format, PIL allows progressive images only on JPEG files, we just need to pass the parameter in order to create a new image with this format
What changed
[IMP] odoo.tools
image_resize_image
to add validation to keep the progressive format if an JPEG image is already progressivekeep_progresive
to use as a flag to check if the conversion needs to be done or not,False
by defaultDesired behaviour
After this patch now the resized images keep the progressive format in their encoder info if the
keep_progressive
key is inside the request context-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr