[pmwiki-users] [SPAM] [SPAM] [SPAM] Re: orientation flag and images
Petko Yotov
5ko at 5ko.fr
Thu Aug 8 00:08:16 PDT 2019
--
PmWeekly Blog : http://www.pmwiki.org/News
If you upgrade : http://www.pmwiki.org/Upgrades
On 08/08/2019 08:00, jdd at dodin.org wrote:
> Le 07/08/2019 à 23:28, Petko Yotov a écrit :
>> PmWiki doesn't do any image orientation/rotation at all. What you see
>> is
>> done by the browser, only.
>
> but same thing in Firefox and Chromium :-(, and why do the thumnail do
> not have the same orientation than the very same open image? Firefox
> do not see the thumb like an image?
The picture has an embedded thumbnail inside, and the thumbnail does not
have the same orientation tag as the picture. Here is the list of your
relevant orientation tags:
$ exiv2 -P EIX web_P1020187* | grep Orient
web_P1020187-2.jpg Exif.Image.Orientation top, left
web_P1020187-2.jpg Exif.Panasonic.CameraOrientation Rotate CCW
web_P1020187-2.jpg Exif.Thumbnail.Orientation left, bottom
web_P1020187-2.jpg Xmp.tiff.Orientation top, left
web_P1020187.jpg Exif.Image.Orientation left, bottom
web_P1020187.jpg Exif.Panasonic.CameraOrientation Rotate CCW
web_P1020187.jpg Exif.Thumbnail.Orientation left, bottom
web_P1020187.jpg Xmp.tiff.Orientation left, bottom
You can see that web_P1020187-2.jpg has its first pixel at the top left,
but its thumbnail has its first pixel bottom left. It is possible when
the browser shows a tiny-size picture it takes the embedded thumbnail
instead of scaling down the large picture.
After some research, it looks like modern Firefox and Chrome use the
orientation tag only when the picture is opened directly. When the
picture is embedded in a web page, they don't use that tag and display
the physical pixels.
>> Browsers do not always behave identically, so I recommend using at
>> least
>> `exiftran -a` on the uploaded (or soon to be uploaded) pictures.
>
> well, I don't want any tool to do the rotation for me. I do it
> manually in digikam (but unedited images do not have the flag
> normalized, I guess, I also asked to digikam list)
I don't think you manually type the raw hex bytes to rewrite the files,
you very likely use some software in your digital camera, or in your
smartphone.
It is possible there is an omission/bug in the software and it only
rotates the picture and not the thumbnail. It doesn't even rotate the
picture but only changes the orientation tag.
At any rate, this is not something controlled or affected by PmWiki in
any way.
>> Note that your desktop picture viewer (gPicView, gThumb, GIMP,
>> kolourpaint among others) and possibly your file manager may rotate
>> the
>> pictures while viewing, so you wouldn't know if they are actually
>> saved
>> upright or only have an orientation tag.
>
> yes. Some app do, some others don't and even some looks at the ration
> L/l to try :-(
That's why when I have to deal with this I use a free/libre software
tool to physically rotate the pixels of the image in the correct
orientation before publishing it. GNU/Linux tools like exiftran,
jpegtran and others can do lossless rotations (without reducing the
picture quality by re-compression). I haven't noticed yet thumbnails
rotated differently from the main picture, but I'll check this in the
future, and probably remove the embedded thumbnails, with `exiftool
-all= photo.jpg`.
> I use default Firefox setup (because I try to
> cope with my reader's install, not mine)
I agree, that's why I suggest fixing the pictures on your computer
before uploading them.
Petko
More information about the pmwiki-users
mailing list