At 04:30 PM 1/7/2002 +0000, Bruce Horrocks wrote:
>In message <5.1.0.14.1.20020107152506.05150f60@server-1>,
>on Mon, 7 Jan 2002 at 15:34:04, Hans Hagen wrote:
>
>>>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] [.
>>
>>I'm not sure if you do have an eps.
>
>That's exactly the point: I don't have an eps file and I want to know why 
>the system thinks that I do.

because your driver settings (dvips) tell context that eps is supported, 
context tries to interpret your file as such (because you specified the 
suffix png, it honnors the suffix, otherwise it would have appended .eps to 
the filename. This may look strange but imagine that one can have files 
called abc.def which are eps files given that they conform to the specs. 
The suffix is only an indication of the type. So, the solution is *not* to 
specify the suffix.

so what the trace says is:

i found a zzz.png and will look at it as if it was eps [enter eps parsing 
mode]
i'm analyzing this file using the eps parser
there are zero dimensions encountered

normally it would go on then looking for files with non zero dimensions but 
here you run into the escape. I probably can best remove that escape 
triggered by the suffix. i will look into that bit later

>I don't really understand this. If I deliberately specify a .png 
>extension, I why doesn't the system simply say: "Error - you have 
>specified a file extension that I don't know how to deal with"?

this is no problem if png is supported by your dvi converter indeed, if it 
is, let me know and i'll add the code needed to the driver

if png is not supported, you needs to convert it to eps (uysing imagemagick 
for instance)

>I appreciate the suggestion but I will have lots of illustrations. Keeping 
>two sets in synch introduces a configuration management issue. It *might* 
>be easier to amend the DVI driver to support .png files (since my viewer 
>already does).

this is no problem, as said, but as far as i know dvips does not support 
png inclusion

>Okay, so next question. Where do I start looking to make the appropriate 
>change? As I pointed out in my first post, PDF output identifies the .png 
>extension properly but DVI doesn't. However, looking through the ConTeXt 
>source, I can only find *one* reference to determining the type and size 
>of graphics files. This is in core-fig.tex. I must have missed something 
>because I don't see how this differs depending upon driver. Any 
>suggestions would be greatly appreciated.

ah, the real thing is done in the spec-*.tex files, the core-fig module 
asks the special drivers if a format is supported and/or if it can handle 
objects and finally inserts the driver code needed to actually include the 
graphic. spec-tr.tex is the file that defined support for dvips.

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-pod.nl
-------------------------------------------------------------------------

Reply via email to