[NTG-context] Rotating jpeg image gives weird output

denis.maier at unibe.ch denis.maier at unibe.ch
Tue Jun 14 12:47:52 CEST 2022


Thanks for your suggestions.

It probably is not EXIF-related. I've opened and saved the image with MS Paint, but that did not change anything (the increase in file size aside...).

Any other ideas? (I tend to think the image is corrupted in one way or the other, but I have no clue how to fix that.)

Best,
Denis

> -----Urspr√ľngliche Nachricht-----
> Von: Max Chernoff <mseven at telus.net>
> Gesendet: Dienstag, 14. Juni 2022 11:45
> An: ntg-context at ntg.nl
> Cc: Maier, Denis Christian (UB) <denis.maier at unibe.ch>
> Betreff: Re: [NTG-context] Rotating jpeg image gives weird output
> 
> > So, I've rotated the image, but now two things happen:
> >
> > 1. there's a weird offset (the image is moved to the right)
> >
> > This seems to be somehow related to the particular file. With a
> > different file that does not happen.
> 
> This can sometimes happen if the image has an embedded EXIF "Orientation"
> tag and you're using a buggy viewer. Really old versions of Firefox/pdf.js had
> this bug. If this is the case, you should be able to reproduce it with the
> following bash commands:
> 
>      convert -size 64x256 canvas:grey -fill black -draw "circle 32,128 16,112"
> demo1.jpg
>      exiftool -Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg
> 
> Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
> \externalfigure. Both pictures should display as circles; if you get ovals, then
> it's definitely EXIF-related.
> 
> > 2. The output contains this line
> > . location=local,global. location=local,global
> 
> Never seen this before, which makes me suspect that maybe this isn't EXIF-
> related. Maybe the image is just subtly corrupted?
> 
> Anyways, if the problem is EXIF-related, then opening and saving the image
> file with MS Paint (or any other non-EXIF-aware editor) should fix things.
> Otherwise, I have no suggestions.
> 
> -- Max


More information about the ntg-context mailing list