Bug #91855

Image with crop set is JPEG compressed twice

Added by Christian Toffolo 21 days ago. Updated 7 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
-
Start date:
2020-07-23
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Image with crop set is JPEG compressed twice so it loses quality 2 times based on jpg_quality setting.

1st compress when crop is executed: https://github.com/TYPO3/TYPO3.CMS/blob/5275e76e4ae7e00a0bce59b8d458e547e427b92b/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php#L87
2nd compress when scaling is executed:
https://github.com/TYPO3/TYPO3.CMS/blob/5275e76e4ae7e00a0bce59b8d458e547e427b92b/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php#L118

A solution could be to use a $jpegQuality=100 the first time it's compressed if it will be compressed a second time (using the configured jpg_quality).


Related issues

Related to TYPO3 Core - Bug #81796: LocalCropScaleMaskHelper does not respect quality setting Closed 2017-07-05

History

#1 Updated by Gerrit Code Review 20 days ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65088

#2 Updated by Gerrit Code Review 20 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65088

#3 Updated by Gerrit Code Review 20 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65088

#4 Updated by Gerrit Code Review 20 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65088

#5 Updated by Helmut Hummel 16 days ago

  • Related to Bug #81796: LocalCropScaleMaskHelper does not respect quality setting added

#6 Updated by Gerrit Code Review 9 days ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#7 Updated by Gerrit Code Review 9 days ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#8 Updated by Gerrit Code Review 9 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#9 Updated by Gerrit Code Review 8 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#10 Updated by Gerrit Code Review 7 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#11 Updated by Gerrit Code Review 7 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

#12 Updated by Gerrit Code Review 7 days ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65187

Also available in: Atom PDF