private void createHeaderBoxFromStandardNode(Node node, int numComps) { HeaderBox header = (HeaderBox)getElement("JPEG2000HeaderBox"); byte unknownColor = (byte)(getElement("JPEG2000ColorSpecificationBox") == null ? 1: 0); if (header != null) { if (numComps ==0); numComps = header.getNumComponents(); header = new HeaderBox(header.getHeight(), header.getWidth(), numComps, header.getBitDepth(), header.getCompressionType(), unknownColor, header.getIntellectualProperty()); } else { header = new HeaderBox(0, 0, numComps, 0, 0, unknownColor, 0); } replace("JPEG2000HeaderBox", header); }
private void createHeaderBoxFromStandardNode(Node node, int numComps) { HeaderBox header = (HeaderBox)getElement("JPEG2000HeaderBox"); byte unknownColor = (byte)(getElement("JPEG2000ColorSpecificationBox") == null ? 1: 0); if (header != null) { if (numComps ==0); numComps = header.getNumComponents(); header = new HeaderBox(header.getHeight(), header.getWidth(), numComps, header.getBitDepth(), header.getCompressionType(), unknownColor, header.getIntellectualProperty()); } else { header = new HeaderBox(0, 0, numComps, 0, 0, unknownColor, 0); } replace("JPEG2000HeaderBox", header); }
private void createHeaderBoxFromStandardNode(Node node, int numComps) { HeaderBox header = (HeaderBox)getElement("JPEG2000HeaderBox"); byte unknownColor = (byte)(getElement("JPEG2000ColorSpecificationBox") == null ? 1: 0); if (header != null) { if (numComps ==0); numComps = header.getNumComponents(); header = new HeaderBox(header.getHeight(), header.getWidth(), numComps, header.getBitDepth(), header.getCompressionType(), unknownColor, header.getIntellectualProperty()); } else { header = new HeaderBox(0, 0, numComps, 0, 0, unknownColor, 0); } replace("JPEG2000HeaderBox", header); }
/** * This method reads the Image Header box * @param length The length of the JP2Header box * * @return false if the JP2Header box was not found or invalid else true * * @exception java.io.IOException If an I/O error ocurred. * * @exception java.io.EOFException If the end of file was reached * */ public boolean readImageHeaderBox(int length) throws IOException, EOFException { if(length == 0) // This can not be last box throw new Error("Zero-length of JP2Header Box"); // Here the JP2Header data (DBox) would be read if we were to use it height = in.readInt(); width = in.readInt(); numComp = in.readShort(); bitDepth = in.readByte(); compressionType = in.readByte(); unknownColor = in.readByte(); intelProp = in.readByte(); if (metadata != null) { metadata.addNode(new HeaderBox(height, width, numComp, bitDepth, compressionType, unknownColor, intelProp)); } return true; }
/** * This method reads the Image Header box * @param length The length of the JP2Header box * * @return false if the JP2Header box was not found or invalid else true * * @exception java.io.IOException If an I/O error ocurred. * * @exception java.io.EOFException If the end of file was reached * */ public boolean readImageHeaderBox(int length) throws IOException, EOFException { if(length == 0) // This can not be last box throw new Error("Zero-length of JP2Header Box"); // Here the JP2Header data (DBox) would be read if we were to use it height = in.readInt(); width = in.readInt(); numComp = in.readShort(); bitDepth = in.readByte(); compressionType = in.readByte(); unknownColor = in.readByte(); intelProp = in.readByte(); if (metadata != null) { metadata.addNode(new HeaderBox(height, width, numComp, bitDepth, compressionType, unknownColor, intelProp)); } return true; }
/** * This method reads the Image Header box * @param length The length of the JP2Header box * * @return false if the JP2Header box was not found or invalid else true * * @exception java.io.IOException If an I/O error ocurred. * * @exception java.io.EOFException If the end of file was reached * */ public boolean readImageHeaderBox(int length) throws IOException, EOFException { if(length == 0) // This can not be last box throw new Error("Zero-length of JP2Header Box"); // Here the JP2Header data (DBox) would be read if we were to use it height = in.readInt(); width = in.readInt(); numComp = in.readShort(); bitDepth = in.readByte(); compressionType = in.readByte(); unknownColor = in.readByte(); intelProp = in.readByte(); if (metadata != null) { metadata.addNode(new HeaderBox(height, width, numComp, bitDepth, compressionType, unknownColor, intelProp)); } return true; }
0xff : ((bitsPerComponent - 1) | (isOriginalSigned(sampleModel) ? 0x80 : 0)); addNode(new HeaderBox(height, width, sampleModel.getNumBands(),
0xff : ((bitsPerComponent - 1) | (isOriginalSigned(sampleModel) ? 0x80 : 0)); addNode(new HeaderBox(height, width, sampleModel.getNumBands(),
0xff : ((bitsPerComponent - 1) | (isOriginalSigned(sampleModel) ? 0x80 : 0)); addNode(new HeaderBox(height, width, sampleModel.getNumBands(),