Open ghost opened 4 years ago
This project is still pretty experimental. Currently only some features used by myself are well tested. However, lzw should work, and lzw decompression did pass my unit test.
Do you have an example of how you are trying to use this package? And if possible post the output of tiffinfo
or tiffdump
ran on the tiff file you are trying to deal with.
To answer your first question. *Image.DecodeImage
returns decompressed image data as []uint8
or []uint16
. The size of this array is height * width * samplePerPixel
, to get a pixel you access buf[samplePerPixel*(width * x + y) + c]
, in which x
is the index of the pixel along the direction of height, y
is along width direction, c
is the channel.
I have another not-yet-released package to deal with this style of multi-dimensional array, but there is still quite some work to finish with that.
There is truly a way to get the compressed data. *Image.RawStripReader
/RawTileReader
provides access to raw data for custom applications.
Do i need compress/decompress image before/after encoding/decoding. It seems LZV images after decoding remains compressed.