pyvips icon indicating copy to clipboard operation
pyvips copied to clipboard

implement exif mirror orientations

Open ZanonEdoardo opened this issue 6 years ago • 5 comments

Hi,

In Image.new_from_file doesn't work in some cases. In the following image, it works correctly (simple rotation), with a mirrored image it doesn't work.

image = pyvips.Image.new_from_file(path, access='random', memory=False, autorotate=True, **kwargs)`

The image left,right and down works, the other not.

What am I doing wrong? Thanks a lot for your help.

down-mirrored left left-mirrored down right-mirrored right

ZanonEdoardo avatar Nov 05 '19 16:11 ZanonEdoardo

Hello, libvips only supports the rotation orientations, not the mirror ones.

I don't know of any real devices that use the mirror codes -- they only appear in test suites.

jcupitt avatar Nov 05 '19 17:11 jcupitt

Hello, libvips only supports the rotation orientations, not the mirror ones.

I don't know of any real devices that use the mirror codes -- they only appear in test suites.

Hi, Thanks for your answer. The webcam photos can produce mirrored images. Can be this feature supported in libvips - pyvips in the future?

In the front cam of Samsung s10, I can generate an image mirrored. (reflection)

ZanonEdoardo avatar Nov 06 '19 10:11 ZanonEdoardo

Oh, interesting, I didn't know they were really used.

Sure, let's tag this issue as an enhancement. Do you have a sample image?

jcupitt avatar Nov 06 '19 10:11 jcupitt

Sample images: https://github.com/recurser/exif-orientation-examples

yunixon avatar Mar 23 '20 10:03 yunixon

Thanks @yunixon, i've forgot to add the images!

ZanonEdoardo avatar Mar 24 '20 07:03 ZanonEdoardo