On 3/10/2015 2:33 AM, Harald Koenig wrote:
On Mar 10, Hans Hagen wrote:
anyway, i need to think a bit about it but we do have all the info available, like
- needed width/height - original width/height
and from that we can calculate some conversion parameters
if you start thinking/working on this, some data from EXIF might be interesting and helpful too, esp. the "Orientation". using that data, automatic rotation to the "correct" orientation would be possible.
maybe there are more interesting information in the exif data?! what about color space infos ? or time stamps or GPS data which might be used to be typeset...
if it would help you i can provide a tracker that will save info like this (per image):
that would be great as my current \message{} stuff is far from being perfect...
Luigi and I looked into the engine bit and decided that it makes no sense to intercept it there as it would mean obscuring possible errors. But, I can intercept it in context so that is what happens now. You will get something: LuaTeX warning: arithmetic: number too big graphics > inclusion > image './IMG_9712c1_bad.jpg' has bad dimensions (-32768pt,23849.10001pt), discarding I also added a tracker: \starttext % \pdfimageresolution300 \enabletrackers[graphics.lognames,graphics.usage] \externalfigure[IMG_9712c1_ok] \externalfigure[IMG_9712c1_bad] \stoptext btw, you can simulate some of the issues with setting \pdfimageresolution to 1-10 The tracker makes a file <jobname>-figures-usage.lya that has two subtables, one with found images, and another with how they are used, including an error flag. I'll upload a beta. Now who will wikify this ... Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------