Project

General

Profile

Actions

Bug #81796

closed

LocalCropScaleMaskHelper does not respect quality setting

Added by Alexander Schnitzler over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-07-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

With

$GLOBALS['TYPO3_CONF_VARS']['GFX']['jpg_quality']

it's possible to set the quality of processed images. Unfortunately that's not true for the LocalCropScaleMaskHelper that generates thumbnails and so on.
It always generates lossless jpeg's resulting in quite huge images.

LocalCropScaleMaskHelper does call

 $gifBuilder->imageMagickConvert

but ignores any quality setting here.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91855: Image with crop set is JPEG compressed twiceClosed2020-07-23

Actions
Actions #1

Updated by Guido S. over 6 years ago

Hi Alex,

whats your intention of this report? Would you have smaller processed thumbnails? But if you set jpgQuality globally to a lower value, you render also heavily compressed images at the frontend.

Btw: The setting jpgQuality is not considered in the master.

Best, Guido

Actions #2

Updated by Alexander Schnitzler over 6 years ago

Hi Guido

whats your intention of this report? Would you have smaller processed thumbnails?

I don't really recall what I thought 9 month ago but from reading my own report here again, I'd say, yes.

But if you set jpgQuality globally to a lower value, you render also heavily compressed images at the frontend.

I don't really get your point here.
If I am not using any cropping the jpg_quality configuration should work both in the frontend and backend. But when using the cropping the configuration is simply ignored. Should apply for backend and frontend as well here.

I don't know if images should be rendered differently in the backend and in the frontend but that's not part of the bug report. There is simply no compression at all for cropped images IIRC.

Btw: The setting jpgQuality is not considered in the master.

I don't get that.

Alex

Actions #3

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

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/56779

Actions #4

Updated by Guido Schmechel over 6 years ago

Hi Alex, sorry I misunderstood you.

I have now added a patchset. The LocalCropScaleMaskHelper sets its own settings.

If the image is not cropped, the GraphicalFunctions::init() takes effect and sets the default quality values, but cropping overwrites them. Maybe my patch is not good enough and we should correct the GraphicalFunctions. But i think it's okay. Let's wait for the reviews :-)

Actions #5

Updated by Gerrit Code Review over 6 years 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/56779

Actions #6

Updated by Gerrit Code Review over 6 years 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/56779

Actions #7

Updated by Guido Schmechel over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions #9

Updated by Helmut Hummel over 4 years ago

  • Related to Bug #91855: Image with crop set is JPEG compressed twice added
Actions

Also available in: Atom PDF