You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Maybe this is just me being new to rust, but i've had an issue reading the color type from a greyscale 8bits tif image.
Here is the image I've had some issues with : Barbara.tif
When trying to read the color type of the image from the decoder I get the following error:
UnsupportedError(InterpretationWithBits(RGBPalette, [8])).
This also leads to an incorrect reading in the image crate image open function: image::open() ->
Unsupported(UnsupportedError { format: Exact(Tiff), kind: GenericFeature("RGBPalette with [8] bits per sample is unsupported") }).
The text was updated successfully, but these errors were encountered:
Just to chime in, although somewhat unrelated, this image is not technically greyscale. Instead, it utilizes the ColorMap feature specified in the TIFF format, which employs a lookup table (e.g., x => RGB(r, g, b)). While the data storage type is 8-bit, the lookup table provides 16bit RGB colors.
Here's the tiffinfo output for Barbara.tif:
$ tiffinfo -r Barbara.tif
TIFFReadDirectory: Warning, Unknown field with tag 37724 (0x935c) encountered.
TIFF Directory at offset 0x8 (8)
Subfile Type: (0 = 0x0)
Image Width: 512 Image Length: 512
Resolution: 72, 72 pixels/inch
--> Bits/Sample: 8
Compression Scheme: None
--> Photometric Interpretation: palette color (RGB from colormap)
Samples/Pixel: 1
Rows/Strip: 512
Planar Configuration: single image plane
--> Color Map: (present)
Photoshop Data: <present>, 5314 bytes
Tag 37724: 0x41,0x64,0x6f,0x62,0x65,0x20,0x50,0x68,0x6f,0x74,0x6f,0x73,0x68,0x6f,0x70,0x20,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x20,0x44,0x61,0x74,0x61,0x20,0x42,0x6c,0x6f,0x63,0x6b,0x0
Barbara.tif contains a lookup table that does indeed generate greyscale colors, but they are techincally represented as 16bit RGB:
Hi,
Maybe this is just me being new to rust, but i've had an issue reading the color type from a greyscale 8bits tif image.
Here is the image I've had some issues with : Barbara.tif
When trying to read the color type of the image from the decoder I get the following error:
UnsupportedError(InterpretationWithBits(RGBPalette, [8])).
This also leads to an incorrect reading in the image crate image open function: image::open() ->
Unsupported(UnsupportedError { format: Exact(Tiff), kind: GenericFeature("RGBPalette with [8] bits per sample is unsupported") }).
The text was updated successfully, but these errors were encountered: