Quantcast

photometric value different when get from TIFF tag or from a TIFFRGBAImage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

photometric value different when get from TIFF tag or from a TIFFRGBAImage

Vincent Torri
Hello

I have attached a small test program which displays the photometric
value of an attached TIFF file

from TIFFRGBAImage : value is 2
from TIFF tag, value is 32845
from TIFFPrintDirectory() (which uses TIFF flag ?) it is also 32845

Is it normal or is it a bug ?

which value should I choose in case there is no bug ?

TIFF file is from ghostscript source code

thank you

Vincent Torri

_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/

tiff_test.c (1K) Download Attachment
logluv-3c-16b.tiff (228 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: photometric value different when get from TIFF tag or from a TIFFRGBAImage

Olivier Paquet-2
2017-01-05 14:30 GMT-05:00 Vincent Torri <[hidden email]>:
I have attached a small test program which displays the photometric
value of an attached TIFF file

from TIFFRGBAImage : value is 2
from TIFF tag, value is 32845
from TIFFPrintDirectory() (which uses TIFF flag ?) it is also 32845

Is it normal or is it a bug ?
 
I think it is normal. Your file is LogLuv but the RGBA API converts it to RGB for you. The man page of TIFFRGBAImageBegin mentions that.

which value should I choose in case there is no bug ?
 
It depends what you need the value for. To interpret the data you get from the RGBA API, 2 (RGB) should be the correct value.

Olivier


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: photometric value different when get from TIFF tag or from a TIFFRGBAImage

Vincent Torri
Hello

On Thu, Jan 5, 2017 at 8:55 PM, Olivier Paquet <[hidden email]> wrote:

> 2017-01-05 14:30 GMT-05:00 Vincent Torri <[hidden email]>:
>>
>> I have attached a small test program which displays the photometric
>> value of an attached TIFF file
>>
>> from TIFFRGBAImage : value is 2
>> from TIFF tag, value is 32845
>> from TIFFPrintDirectory() (which uses TIFF flag ?) it is also 32845
>>
>> Is it normal or is it a bug ?
>
>
> I think it is normal. Your file is LogLuv but the RGBA API converts it to
> RGB for you. The man page of TIFFRGBAImageBegin mentions that.

ha, ok, it seems normal, indeed

>> which value should I choose in case there is no bug ?
>
>
> It depends what you need the value for. To interpret the data you get from
> the RGBA API, 2 (RGB) should be the correct value.


I am writing a multi-document viewer and i'm writing a plugin for TIFF
files with multiple directories. I want to display the informations of
the TIFF file (and directories too).
So I will use the tags

thank you

Vincent Torri
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Loading...