Re: [css3-images] Units for `image-resolution: from-image`

On Fri, 2013-07-26 at 13:41 +0100, Simon Sapin wrote:

> The only image formats that I found that have resolution metadata are 
> JPEG and TIFF, where it is specified in "image pixels per inches" or 
> "per centimeter".

PNG also has it, with some weird prose in the spec like "pixels per
unit" or something. A practical way to find out is to save images in
various formats from PhotoShop and GIMP, with dpi set to something
specific, close the file, rename it or copy it (to defeat any internal
program-spocific memory), then reopen it. In some cases the information
may be stored in EXIF or other metadata in a non-obvious way.

> How should this be interpreted? I think it should map to CSS in and cm 
> (and therefore the resolution is interpreted as dpi and dpcm) rather 
> than physical inches and centimeters, which otherwise don’t exist in CSS.

I agree it needs to be specified, so that there's interoperability.

Since CSS doesn't seem to have device units (yet?) it should presumably
be CSS inches. You're likely to want to have other document elements the
same size, to align.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Received on Friday, 26 July 2013 23:19:47 UTC