dvipng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dvipng] does dvipng include the dpi information in its output?


From: jfbu
Subject: Re: [Dvipng] does dvipng include the dpi information in its output?
Date: Mon, 15 Oct 2012 16:06:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc13 Thunderbird/3.1.10

le 15/10/2012 12:59 selon Jan-Åke Larsson:
>> me that the older dvipng images had been at 72dpi. In fact these images
>> > were also at 96dpi but that information is either not in the file
>> > or not understood by Preview. 
> Not in the file. From what I can gather (use the source, Luke!) the
> currently alpha version 2.1.0 of libgd will support this. I will make
> sure that dvipng uses this too, if I only can figure out how to enable
> it. libgd.org is currently down, so I don't have easily accessible docs
> just now (on my lunch hour).
> 

Sorry to again post to the mailing list about something that you
know far better than I do (it is like \infty to 0 !):

from
http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.8

Physical Pixel Dimensions (pHYs)

    * Status:   PNG Specification
    * Location:   before first IDAT
    * Multiple:   no 

The pHYs chunk encodes the absolute or relative dimensions of pixels. For 
example, an image scanned at 600 dots per inch has pixels with known, absolute 
sizes--namely, one six-hundredth of an inch in both x and y directions. 
Alternatively, an image created on a 1280 × 1024 display will have nonsquare 
pixels, and the relative dimensions of each pixel, also referred to as the 
aspect ratio, may be stored so the image can be displayed as it was intended to 
be seen.

The layout of the chunk is shown in Table 11-4.

Table 11-4. pHYs Chunk

Field   Length and Valid Range
Pixels per unit, x axis         4 bytes (0-2,147,483,647)
Pixels per unit, y axis         4 bytes (0-2,147,483,647)
Unit specifier  1 byte (0, 1)

If the unit specifier byte is 1, the units are meters; if it is 0, the units 
are unspecified, and only the relative dimensions are known. Currently, no 
other values are valid. Note that the format of the chunk precludes pixel sizes 
greater than one meter, which should not be a significant hardship for most 
applications, but it allows pixels as small as 4.7 Ångstroms, which is roughly 
the size of a single atom.


best regards
Jean-François




reply via email to

[Prev in Thread] Current Thread [Next in Thread]