Review main Merged

77858[BUGFIX] Define minimum crop size for image manipulation

Jochen Roth CR +2 V +2 Easy +19 −3 updated 03/01/23, 09:59

Commit message

Currently it's possible to set the cropping
to 0x0 in size. This leads to an error.

This has been fixed by setting a minimal
required width/height for the cropping.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Josef Glatz +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Josef Glatz +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1012

  1. Jochen Roth uploaded patch set 1 02/14/23, 20:28

  2. core-ci voted on patch set 1 V +1 02/14/23, 20:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37714

  3. Georg Ringer voted on patch set 1 V +1 CR +1 02/15/23, 06:13

  4. Josef Glatz commented on patch set 1 V +1 CR +1 02/15/23, 07:02

    I couldn't imagine a scenario where someone crops images to a smaller size as 10x10 pixels. But we could add an important rst for the sake of completeness if anyone else isn't sure either 😊
  5. Oli Bartsch uploaded patch set 2 CR +1 V +1 02/15/23, 16:13

  6. core-ci voted on patch set 2 V +1 02/15/23, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37770

  7. Oli Bartsch commented on patch set 2 02/15/23, 16:24

    With this change I'm no longer able to use a width or height < 43px while according to the patch the min should be 15.
  8. Jochen Roth commented on patch set 2 02/16/23, 10:02

    Reply

    Thats correct. Based on this size, the `imageOriginalSizeFactor` + `width` is used to calculate the naturalWidth/naturalHeight. So you'll never see a size of 15x15px on the sidebar. But the CropperJS box is actually 15x15px.
  9. Oli Bartsch commented on patch set 2 V +1 CR +1 02/16/23, 10:15

    Reply

    All right. Thanks for the explanation.
  10. Josef Glatz voted on patch set 2 V +1 CR +1 03/01/23, 09:34

  11. Oli Bartsch voted on patch set 2 V +2 CR +2 03/01/23, 09:59

  12. Oli Bartsch merged patch set 3 03/01/23, 09:59