/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
/** * SWT does not support 16-bit depths. If this image uses * 16-bit depths, convert the data to an 8-bit depth. */ byte[] validateBitDepth(byte[] data) { if (headerChunk.getBitDepth() > 8) { byte[] result = new byte[data.length / 2]; compress16BitDepthTo8BitDepth(data, 0, result, 0, result.length); return result; } else { return data; } } /**
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);
+ (reference[DATA_OFFSET + 1] & 0xFF); if (header.getBitDepth() > 8) { return PNGFileFormat.compress16BitDepthTo8BitDepth(gray); | (reference[DATA_OFFSET + 5] & 0xFF); if (header.getBitDepth() > 8) { red = PNGFileFormat.compress16BitDepthTo8BitDepth(red); green = PNGFileFormat.compress16BitDepthTo8BitDepth(green); blue = PNGFileFormat.compress16BitDepthTo8BitDepth(blue);