h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.65k stars 337 forks source link

Page Geometry wrong after watermark #465

Open suntong opened 8 months ago

suntong commented 8 months ago

As explained in #201, exif autorot is applied at the start, but such meta data is missing after applying watermark.

Before image: https://fars.ee/v4So

image

After image: https://fars.ee/dm7d

image

As we can see that the exif autorot is applied first, but the final exif:Orientation picture orientation is wrong.

UPDATE:

So I took a closer look with identify -verbose after installing imagemagick. Here are the changes in the meta field:

https://www.diffchecker.com/PXo6uJ4r/

I.e., it turns out the Orientation: RightTop was kept as-is in the meta field, but the (Page) Geometry: of 1920x1080 has been wrongly changed to 1080x1920.