문제

I am trying to rotate PNG images using exiftool using following command line:

exiftool -Orientation=3 -n ImageName

The command line run successfully in terminal and I can get the Orientation info via command line: exiftool -Orientation -n ImageName, saying 3 in this case. But the PNG image itself doesn't rotate at all. This command line works fine with JPG and TIFF image. So how to rotate a PNG image using exiftool?

도움이 되었습니까?

해결책

I'm not familiar with that tool, but bear in mind:

1) you are not really rotating the image, you are (at best) setting a metadata property that (might) suggest to an image reader a different orientation than the default.

2) how image readers (including web browsers) interpret metadata when showing an image can be quite unpredictable.

3) PNG has little or no EXIF metadata support.

I don't know what metadata ("chunk", in PNG vocabulary) that program writes into the PNG image when you tell it to change the "orientation", but I would not be surprised if only that program can read that. You can use this tweakpng to peek inside the PNG chunks.

Why don't you do a "real" image rotation?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top