|
Boost : |
Subject: Re: [boost] Half-baked GIL IO extension review
From: Edd Dawson (lists_at_[hidden])
Date: 2010-12-07 15:44:53
On 12/7/2010 3:55 PM, Christian Henning wrote:
> Hi Edd,
>
>> All I know is that libpng and libjpeg provide access to this information in
>> a crude form. I don't know whether physical dimensions are mandated by the
>> respective formats or if the libraries are implementing common extensions,
>> but in each case, the information is there.
>>
>> In the case of libjpeg, the information is exposed/advertised in the
>> jpeg_decompress_struct and jpeg_compress_struct structures. You can see how
>> I use them here:
>> http://bitbucket.org/edd/jpegxx/src/ea2492a1a4a6/src/read.cpp#cl-62
>> http://bitbucket.org/edd/jpegxx/src/ea2492a1a4a6/src/write.cpp#cl-75
>>
>> In libpng, have a look in the docs for e.g. png_get_x_pixels_per_meter.
>>
>> I'm entirely ignorant in the case of libtiff, I'm afraid.
>
> Cool. I'll add this to my todo list. Seems trivial to add. Do you have
> by any chance some images containing such information?
Made in GIMP:
http://dl.dropbox.com/u/3182125/36dpi.png
http://dl.dropbox.com/u/3182125/36dpi.jpg
Kind regards,
Edd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk