Closed GoogleCodeExporter closed 8 years ago
Thank you for taking the time to report this issue.
I was able to reproduce this bug by calling `crop` then calling `watermark`:
Thumbnails.of("path/to/image")
.size(300, 300)
.crop(Positions.CENTER)
.watermark(Positions.BOTTOM_RIGHT, ImageIO.read(new File("path/to/watermark")), 0.5f)
.toFile("path/to/thumbnail");
The need to fix this bug has been acknowledged.
Original comment by coobird...@gmail.com
on 5 Sep 2013 at 10:01
Additional notes to self:
When running the following code, the watermark is shown properly:
Thumbnails.of("path/to/image")
.size(300, 300)
.crop(Positions.CENTER)
.watermark(Positions.CENTER, ImageIO.read(new File("path/to/watermark")), 0.5f)
.toFile("path/to/thumbnail");
Therefore, this appears to be an issue where the size *before* the crop is
being used to calculate the position of the watermark, causing the watermark to
be drawn outside of the thumbnail.
Original comment by coobird...@gmail.com
on 5 Sep 2013 at 10:03
A fix has been created.
This will be rolled into the next release.
Original comment by coobird...@gmail.com
on 5 Sep 2013 at 12:54
thank you!
Original comment by diogo.arm
on 5 Sep 2013 at 2:35
Original comment by coobird...@gmail.com
on 6 Sep 2013 at 6:16
This issue has been addressed in Thumbnailator 0.4.6.
Original comment by coobird...@gmail.com
on 8 Sep 2013 at 5:19
Original issue reported on code.google.com by
diogo.arm
on 5 Sep 2013 at 2:03