mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-03 11:35:29 -04:00
#624: Added metadata support for 16 bit USHORT gray.
(cherry picked from commit 060b6cf852109cdf5e56225b3f5f9f0865ca9f5f)
This commit is contained in:
parent
ff7edbd223
commit
09573b52ac
@ -193,10 +193,13 @@ final class TGAMetadata extends AbstractMetadata {
|
||||
|
||||
switch (header.getPixelDepth()) {
|
||||
case 8:
|
||||
bitsPerSample.setAttribute("value", createListValue(1, Integer.toString(header.getPixelDepth())));
|
||||
bitsPerSample.setAttribute("value", createListValue(1, "8"));
|
||||
break;
|
||||
case 16:
|
||||
if (header.getAttributeBits() > 0 && extensions != null && extensions.hasAlpha()) {
|
||||
if (header.getImageType() == TGA.IMAGETYPE_MONOCHROME || header.getImageType() == TGA.IMAGETYPE_MONOCHROME_RLE) {
|
||||
bitsPerSample.setAttribute("value", "16");
|
||||
}
|
||||
else if (header.getAttributeBits() > 0 && extensions != null && extensions.hasAlpha()) {
|
||||
bitsPerSample.setAttribute("value", "5, 5, 5, 1");
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user