ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with mis-identified .png graphics files when generating DVI
@ 2002-01-07 12:33 Bruce Horrocks
  2002-01-07 14:34 ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Horrocks @ 2002-01-07 12:33 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

Hi all,

I posted the attached a while ago but have received no responses. I'm 
still stuck though. :-(

If there was anyone who had half an idea but didn't post a reply because 
they thought that someone else might know better then please feel free 
to come forward now.

Thanks in advance.

   ------- Forwarded message follows -------

[-- Attachment #2: Type: message/rfc822, Size: 4018 bytes --]

From: Bruce Horrocks <bh@granby.demon.co.uk>
To: ntg-context@ntg.nl
Subject: Problem with mis-identified .png graphics files when generating DVI
Date: Sun, 30 Dec 2001 17:08:08 +0000
Message-ID: <95L6D5B4n0L8Ew0a@granby.demon.co.uk>

I have a simple test file that includes a PNG graphic. Generating a PDF
file works fine. However, when I try to produce a DVI file, ConTeXt mis-
identifies the PNG file as EPS. I'd like to know why and what can be
done, if anything?

Here is the test file:

\traceexternalfigurestrue
\starttext
\startfiguretext[right][fig:example]
{none}
{\externalfigure
  [zzz.png]
  [width=2in,height=1in]
}
This is a test.
\stopfiguretext
\stoptext

In the log file, I get the following when generating the PDF file:

systems        : begin file 00_master at line 3
 <./zzz.png>
figures        : dimensions of ./zzz.png loaded from figurefile itself

[locating ./zzz.png as png] [analyzing ./zzz.png on . as png] [found] [./zzz.pn
g: t={png} m={png} l=dummy w=9472573 h=4736286 sx=73.2 sy=75.0 ox=\scratchdimen
  oy=\scratchdimen ] (./00_master.tuo)
floatblocks    : 1 placed

and, as I said, this works fine - ConTeXt has correctly identified the
files as PNG and found the correct dimensions and scale factors.

When producing a DVI file, the equivalent extract from the logfile is:

systems        : begin file 00_master at line 3
figures        : figure ./zzz.png has zero dimensions
figures        : dimensions of ./zzz.png loaded from figurefile itself

[locating ./zzz.png as eps] [analyzing ./zzz.png on . as eps] [zero] [found] [.
/zzz.png: t={eps} m={eps} l=dummy w=9472573 h=4736286 sx=0.09999 sy=0.09999 ox=
\scratchdimen  oy=\scratchdimen ] (./00_master.tuo)
floatblocks    : 1 placed

This doesn't work, presumably because ConTeXt is mis-interpreting the
file as EPS and messing up the scale factors. What I would like to know
is where/why this is happening?

As far as I can tell, the file core-fig.tex contains the relevant code.
However, my knowledge of (Con)TeX is obviously not good enough because I
don't understand how this code is driver specific? If anyone can shed
any light on this then I would be most grateful.

Version info:
This is pdfeTeX, Version 3.14159-14f-released-20000525-2.1 (MiKTeX 2.1) (preloaded format=cont-en 2001.12.30)  30 DEC 2001 16:53
ConTeXt  ver: 2001.12.20  fmt: 2001.12.30  int: english  mes: english

Thanks in advance.
-- 
Bruce Horrocks
Hampshire
England
bh@granby.demon.co.uk

[-- Attachment #3: Type: text/plain, Size: 59 bytes --]

-- 
Bruce Horrocks
Hampshire
England
bh@granby.demon.co.uk

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Problem with mis-identified .png graphics files when generating DVI
@ 2001-12-30 17:08 Bruce Horrocks
  0 siblings, 0 replies; 8+ messages in thread
From: Bruce Horrocks @ 2001-12-30 17:08 UTC (permalink / raw)


I have a simple test file that includes a PNG graphic. Generating a PDF
file works fine. However, when I try to produce a DVI file, ConTeXt mis-
identifies the PNG file as EPS. I'd like to know why and what can be
done, if anything?

Here is the test file:

\traceexternalfigurestrue
\starttext
\startfiguretext[right][fig:example]
{none}
{\externalfigure
  [zzz.png]
  [width=2in,height=1in]
}
This is a test.
\stopfiguretext
\stoptext

In the log file, I get the following when generating the PDF file:

systems        : begin file 00_master at line 3
 <./zzz.png>
figures        : dimensions of ./zzz.png loaded from figurefile itself

[locating ./zzz.png as png] [analyzing ./zzz.png on . as png] [found] [./zzz.pn
g: t={png} m={png} l=dummy w=9472573 h=4736286 sx=73.2 sy=75.0 ox=\scratchdimen
  oy=\scratchdimen ] (./00_master.tuo)
floatblocks    : 1 placed

and, as I said, this works fine - ConTeXt has correctly identified the
files as PNG and found the correct dimensions and scale factors.

When producing a DVI file, the equivalent extract from the logfile is:

systems        : begin file 00_master at line 3
figures        : figure ./zzz.png has zero dimensions
figures        : dimensions of ./zzz.png loaded from figurefile itself

[locating ./zzz.png as eps] [analyzing ./zzz.png on . as eps] [zero] [found] [.
/zzz.png: t={eps} m={eps} l=dummy w=9472573 h=4736286 sx=0.09999 sy=0.09999 ox=
\scratchdimen  oy=\scratchdimen ] (./00_master.tuo)
floatblocks    : 1 placed

This doesn't work, presumably because ConTeXt is mis-interpreting the
file as EPS and messing up the scale factors. What I would like to know
is where/why this is happening?

As far as I can tell, the file core-fig.tex contains the relevant code.
However, my knowledge of (Con)TeX is obviously not good enough because I
don't understand how this code is driver specific? If anyone can shed
any light on this then I would be most grateful.

Version info:
This is pdfeTeX, Version 3.14159-14f-released-20000525-2.1 (MiKTeX 2.1) (preloaded format=cont-en 2001.12.30)  30 DEC 2001 16:53
ConTeXt  ver: 2001.12.20  fmt: 2001.12.30  int: english  mes: english

Thanks in advance.
-- 
Bruce Horrocks
Hampshire
England
bh@granby.demon.co.uk


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-01-08 14:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-07 12:33 Problem with mis-identified .png graphics files when generating DVI Bruce Horrocks
2002-01-07 14:34 ` Hans Hagen
2002-01-07 16:30   ` Bruce Horrocks
2002-01-08  8:33     ` Hans Hagen
2002-01-08 12:59       ` Problem with mis-identified .png graphics files when generatingDVI George N. White III
     [not found]       ` <Pine.GSO.4.43.0201080834050.13821-100000@emerald.bio.dfo.c a>
2002-01-08 14:35         ` Problem with mis-identified .png graphics files when generating DVI Hans Hagen
2002-01-08  9:08     ` Taco Hoekwater
  -- strict thread matches above, loose matches on Subject: below --
2001-12-30 17:08 Bruce Horrocks

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).