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
BitsPerSample is modeled as an Int, although in multi-band TIFFs this tag contains as many values as SamplesPerPixel. This results in producing invalid multi-band TIFFs that cannot be consumed by third-party tools.
To Reproduce
Add a file read-and-write-back.scala to the project root directory with the following content:
bitsPerSample: Int=1, // This is written as an array per sample, but libtiff only takes one value, and so do we.
However, the comments refers to a lib libtiff which I am not sure to follow what it refers to. Is this comment legacy? If yes, would you consider changing the model of bitsPerSample to be an Array[Short] instead of an Int?
The text was updated successfully, but these errors were encountered:
Describe the bug
BitsPerSample
is modeled as anInt
, although in multi-band TIFFs this tag contains as many values asSamplesPerPixel
. This results in producing invalid multi-band TIFFs that cannot be consumed by third-party tools.To Reproduce
Add a file
read-and-write-back.scala
to the project root directory with the following content:Then, run the following commands from a shell, from within the project root directory:
Actual output:
Note that the
BitsPerSample
tag of the written file/tmp/multiband.tif
is8
, whereas the original file contained8 8 8 8
.Expected output:
The
BitsPerSample
tag should be a collection.Environment
Additional context
According to the following comment, this issue seems to be known from the project maintainers:
geotrellis/raster/src/main/scala/geotrellis/raster/io/geotiff/tags/BasicTags.scala
Line 25 in d65d6a2
However, the comments refers to a lib
libtiff
which I am not sure to follow what it refers to. Is this comment legacy? If yes, would you consider changing the model ofbitsPerSample
to be anArray[Short]
instead of anInt
?The text was updated successfully, but these errors were encountered: