ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: Problem with mis-identified .png graphics files when generating DVI
Date: Tue, 08 Jan 2002 09:33:35 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20020108092150.02f15aa8@server-1> (raw)
In-Reply-To: <Sh0x1KCT0cO8Ew5Y@granby.demon.co.uk>

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 | pragma@wxs.nl
                       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	other threads:[~2002-01-08  8:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-07 12:33 Bruce Horrocks
2002-01-07 14:34 ` Hans Hagen
2002-01-07 16:30   ` Bruce Horrocks
2002-01-08  8:33     ` Hans Hagen [this message]
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

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=5.1.0.14.1.20020108092150.02f15aa8@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /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).