Review main Merged

81439[TASK] Consistently apply ImageMagick parameters when converting

Benni Mack CR +2 V +2 Normal +65 −80 updated 10/18/23, 16:22

Commit message

One of the main methods for processing logic when
working the ImageMagick in TYPO3 is "imageMagickConvert".

This method is rather cryptic when detecting the file extension,
the final command and additional parameters / instructions
and default commands for certain file types, so this code is brought in
line with better naming and more readability.

The quality setting for example is now properly
used for jpg/jpeg files, which wasn't always the case.

In addition, all non-public properties are now typed.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1317

  1. Benni Mack uploaded patch set 1 10/17/23, 08:00

  2. core-ci voted on patch set 1 V +1 10/17/23, 08:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47850

  3. Benni Mack rebased onto patch set 2 V +1 10/17/23, 11:39

  4. core-ci voted on patch set 2 V +1 10/17/23, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47863

  5. Benni Mack uploaded patch set 3 V +1 10/17/23, 12:23

  6. core-ci voted on patch set 3 V -1 10/17/23, 12:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47866

  7. Benni Mack commented on patch set 4 V -1 10/17/23, 13:11

    Published edit on patch set 3.
  8. core-ci voted on patch set 4 V +1 10/17/23, 13:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47867

  9. Stefan Bürk voted on patch set 4 CR +1 10/18/23, 06:49

  10. Stefan Bürk voted on patch set 4 V +1 10/18/23, 07:09

  11. Andreas Kienast commented on patch set 4 CR -1 10/18/23, 13:14

    temp, on it
  12. Andreas Kienast commented on patch set 4 10/18/23, 13:25

    GraphicalFunctions.php:334

    This was previously `$params`. Changing this may cause a regression at a later point (line 364 onwards), wouldn't it?
  13. Benni Mack commented on patch set 4 10/18/23, 13:30

    GraphicalFunctions.php:334 Reply

    the main problem here is that IM first needs to set the scaling ($this->scalecmd) and then works in that area. $params is actually additional parameters, which should be added at the very end: If we want to crop from the values, we need to do this first. I had quite a lot of failing tests fiddling around. This patch actually serves as a basis for finally moving on with this one: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67234
  14. Andreas Kienast commented on patch set 4 V +1 CR +1 10/18/23, 13:34

    GraphicalFunctions.php:334 Reply

    Ack
  15. Christian Kuhn voted on patch set 4 V +1 CR +1 10/18/23, 15:29

  16. Benni Mack commented on patch set 4 V +2 CR +2 10/18/23, 16:22

    thanks guys!
  17. Benni Mack merged patch set 5 10/18/23, 16:22