ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Max Chernoff via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Max Chernoff <mseven@telus.net>
Subject: Re: Rotating jpeg image gives weird output
Date: Tue, 14 Jun 2022 03:45:13 -0600	[thread overview]
Message-ID: <0d052455-8c7c-a862-55cc-138043193771@telus.net> (raw)
In-Reply-To: <46348c1cd2134595aa5d8660badad09a@unibe.ch>

> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2022-06-14  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  8:56 Denis Maier via ntg-context
2022-06-14  9:45 ` Max Chernoff via ntg-context [this message]
2022-06-14 10:47   ` Denis Maier via ntg-context
2022-06-14 22:52     ` Max Chernoff via ntg-context
2022-06-15 11:44       ` Denis Maier via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d052455-8c7c-a862-55cc-138043193771@telus.net \
    --to=ntg-context@ntg.nl \
    --cc=mseven@telus.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).