Skip to content

Images are silently resampled to bigger Size #21

@realulim

Description

@realulim

Describe the bug

This problem is reproducible with the Online Demo at https://addonsv24.flowingcode.com/image-crop/upload

Upload an image of, say, 900x640 pixels. Once the crop dialog is opened, this image has been resampled to a bigger size. With my main test image this resulted in 1152x768 pixels, but I cannot share that image. I've created a test image, which I am going to attach here, and that is upsampled to 1080x768.

Either way, I don't know where this happens, but the end result is that a cropped image could actually have more pixels than the original - although it is of course unsharper due to resampling.

Expected behavior

That the original image is used verbatim.

Minimal reproducible example

https://addonsv24.flowingcode.com/image-crop/upload

The problem is also easily reproducible with the "Basic Image Crop" in the Online Demo. Just select the entire image with the crop tool and compare original image and cropped image. I attach a screenshot showing that the cropped image is actually larger than the original.

Image

Add-on Version

1.1.2

Vaadin Version

24.6.5

Additional information

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions