Boost logo

Boost Users :

Subject: Re: [Boost-users] [Gil] TIFF file with mixed 8/16 bit channel
From: Christian Henning (chhenning_at_[hidden])
Date: 2011-11-30 10:24:34


Hi Corinna, I'm sorry for getting back so late. In any event, your
image you sent me caused some kind of trouble for us. But it's been
now concluded that the image is just 8-bit all channels. Thanks to
Mateusz who took the lead and even confirmed it on the libtiff mailing
list.

I started out assuming we have an heterogeneous 5 channel image and
found some bugs along the way, which are fixed now. You can grab the
latest from the repository.

For now I suggest you read the image as follows:

typedef bit_aligned_image5_type< 8, 8, 8, 8, 8, devicen_layout_t< 5 >
>::type image_t;
image_t img;
read_image( "Shadow_cmyk8.tif", img, tiff_tag() );

I think it's fairly simple to added support for the cmyka colorspace
and I'll try that as soon as I can.

Let me know if you have any more troubles.

Regards,
Christian

On Mon, Nov 7, 2011 at 5:02 AM, Corinna Kinchin <crin_at_[hidden]> wrote:
> Hey Christian,
>
> Many thanks for your response, good luck with the fix and
> it would be marvellous if you are able to keep us posted
> on progress ...
>
> Meanwhile I have another TIFF file to hand (also generated
> by Photoshop) which has these characteristics:
>
>  Colorspace: CMYK
>  Depth: 16-bit
>  Channel depth:
>    cyan: 16-bit
>    magenta: 16-bit
>    yellow: 16-bit
>    black: 15-bit
>    alpha: 16-bit
>
> Let me know if you'd like a copy to test with.
>
> All the best,
>
> Corinna ...
>
>  Corinna Kinchin                 email: ckinchin_at_[hidden]
>  Datazone Ltd.                   Tel:   +353 64 66 28964
>  Palm Gate, Greenane,            Fax:   +353 64 66 28965
>  Killarney, Co. Kerry, Ireland   URL:   http://www.miramo.com
>
>  Datazone - makers of `Miramo', the automated publishing tool
>
>>
>> Hi Corinna,
>>
>> I have been busy trying to load your picture but some internals of the
>> tiff reader doesn't allow for that right now. Hopefully I can fix
>> soon.
>>
>> > I'm just downloading the latest boost version (am using 1.42 at the moment
>> > which doesn't seem to have the cymk16161688_image_t you refer to)
>> > and will try out your suggestion.
>>
>> You have to build such image type. Here is how you do it:
>>
>> typedef bit_aligned_image5_type< 16, 16, 16, 8, 8, cmyka_layout_t
>> >::type image_t;
>>
>> >
>> > And this is almost certainly an RTFM question but how does one know
>> > which input image type to use? If you had a moment to point me in
>> > the right direction or to jot down an elegant code snippet to get
>> > me on the right track for reading different flavours of TIFF files
>> > I'd be eternally grateful ...
>>
>> You could use a dynamic_image. See the dynamic_image extension.
>>
>> Regards,
>> Christian
>>
>>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net