-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b150
signature: TIFFField(TIFFTag tag, int value)
according to docs,
* Constructs a {@code TIFFField} with a single non-negative integral
* value.
* The field will have type
* {@link TIFFTag#TIFF_SHORT TIFF_SHORT} if
* {@code val < 65536} and type
* {@link TIFFTag#TIFF_LONG TIFF_LONG} otherwise.
TIFF_LONG is "32-bit (4-byte) unsigned integer" (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf), so, e.g., 2^32 -1 is a correct value.
but we obviously cannot set values greater than Integer.MAX_VALUE (2^31 - 1) using this constructor (NOK) (exception - negative argument).
possible solution -- to use long type for the 2nd arg.
according to docs,
* Constructs a {@code TIFFField} with a single non-negative integral
* value.
* The field will have type
* {@link TIFFTag#TIFF_SHORT TIFF_SHORT} if
* {@code val < 65536} and type
* {@link TIFFTag#TIFF_LONG TIFF_LONG} otherwise.
TIFF_LONG is "32-bit (4-byte) unsigned integer" (http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf), so, e.g., 2^32 -1 is a correct value.
but we obviously cannot set values greater than Integer.MAX_VALUE (2^31 - 1) using this constructor (NOK) (exception - negative argument).
possible solution -- to use long type for the 2nd arg.