mullema / k3-image-clip

Visually crop images with a handy image editor directly inside the panel
MIT License
40 stars 4 forks source link

Wrong sizes using minwidth minheight with portrait format clip #6

Closed Pandorrrrrra closed 5 years ago

Pandorrrrrra commented 5 years ago

Hey Matthias, really great plugin !

I run into an issue trying it out:

Description Setting a clip using minwidth and minheight with portrait format, the image size is wrong. Scaling the selection on the image, the selected area also snaps to a narrower area if the minimum is reached. Independent from the selection size, the image ratio is not always exact.

To Reproduce

  1. Use the following blueprint options:
clip:
 minwidth: 275
 minheight: 315
 ratio: fixed
  1. Scale the selection on the image to the smallest size
  2. The selected are snaps to a narrower area
  3. Check the cropped image an compare the sizes: blueprint = 275 315, image = 274 360

Expected behavior The image size should be 275 * 315. If the 274 instead of 275 has to do with rounding, maybe it could just round to the values of the blueprint (275) ?

Kirby Version 3.2.3

Desktop macOS Sierra 10.12.6 Firefox 68.0.1 Chrome 76.0

mullema commented 5 years ago