W3C home > Mailing lists > Public > www-style@w3.org > July 2013

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

From: Liam R E Quin <liam@w3.org>
Date: Fri, 26 Jul 2013 19:19:15 -0400
Message-ID: <1374880755.15669.781.camel@localhost>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style@w3.org
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 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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC