Skip to content

Panorama images are not cropped correctly (cropped image too small) #26

@realulim

Description

@realulim

Describe the bug

With panorama images I mean images that are wider than the available screen pixels.

Let's assume a panorama image of 2000x1000 pixels and let's further assume that we initialize the plugin with a crop frame of at least 500x500 pixels. And let's assume that we have 1500 pixels of screen space for the image within the crop dialog.

In that case the original image is scaled down to 1500x750 pixels, so that no horizontal scrollbar appears. If I now crop the image keeping the crop size at the minimum dimensions, then I do not get a cropped image of 500x500 pixels, but one of 375x375 pixels.

If I have understood the code correctly, then this means that the crop is not taken from the original image, but from the scaled down version.

Expected behavior

I would expect that the crop is always taken from the original image, not from a scaled down version, and that the size of the cropped image is as specified.

In this example I would expect a cropped image of 500x500 pixels showing approximately the same excerpt of the image that was selected by the 375x375 crop frame.

Minimal reproducible example

No response

Add-on Version

1.1.2

Vaadin Version

24.7.11

Additional information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions