Skip to content

Extra white space in cropped image #7

Closed
@gmerton

Description

@gmerton

Describe the bug

Hello,
I'm having an issue where the cropped image includes extra white space to the right and bottom of the content. The attached screenshot shows this concretely by highlighting the area of the cropped img tag

Any thoughts on if this is indeed a bug, or user error on my part?

Many thanks for this add-on!

Screenshot 2024-12-09 at 11 05 01 PM

Expected behavior

My expectation is that any image would behave like the empty-plant example, where the the img is "tight" and contains no white space adjacent to the cropped selection.

Minimal reproducible example

I reproduced this example by cloning this repo, uploading my own png to the images directory, and modifying the source image in the BasicImageCropDemo class as shown below. No other changes were made to the original code. I am attaching my test png here.

//Image image = new Image("images/empty-plant.png", "image to crop");
   Image image = new Image("images/91930336-24e7-4d6f-99dd-d504fbf2caad.png", "image to crop");

That image is here:

91930336-24e7-4d6f-99dd-d504fbf2caad

Add-on Version

1.1.1-SNAPSHOT

Vaadin Version

24.4.6

Additional information

Using Chrome on a MacOS. Lmk if any other info would help!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions