protected void readSOF(int dbyt, RepInfo info) throws IOException { int length = readUnsignedShort(_dstream); int precision = readUnsignedByte(_dstream, this); int nLines = readUnsignedShort(_dstream); int samPerLine = readUnsignedShort(_dstream); int numComps = readUnsignedByte(_dstream, this); skipBytes(_dstream, length - 8, this); if (!_seenSOF) { _niso.setImageLength(nLines); _niso.setImageWidth(samPerLine); int[] bps = new int[numComps]; for (int i = 0; i < numComps; i++) { bps[i] = precision; } _niso.setBitsPerSample(bps); _niso.setSamplesPerPixel(numComps); _propList.add(new Property("CompressionType", PropertyType.STRING, JpegStrings.COMPRESSION_TYPE[dbyt - 0XC0])); _seenSOF = true; } }
protected void readDHP(RepInfo info) throws IOException { int length = readUnsignedShort(_dstream); int precision = readUnsignedByte(_dstream, this); int nLines = readUnsignedShort(_dstream); int samPerLine = readUnsignedShort(_dstream); int numComps = readUnsignedByte(_dstream, this); skipBytes(_dstream, length - 8, this); if (!_seenSOF) { _niso.setImageLength(nLines); _niso.setImageWidth(samPerLine); int[] bps = new int[numComps]; for (int i = 0; i < numComps; i++) { bps[i] = precision; } _niso.setBitsPerSample(bps); _niso.setSamplesPerPixel(numComps); _seenSOF = true; } }
_niso.setSamplesPerPixel(numComps); _seenSOF = true; return;
_niso.setPlanarConfiguration (1); _niso.setRowsPerStrip (4294967295L); _niso.setSamplesPerPixel (1); _niso.setByteOrder(bigEndian ? "big-endian" : "little-endian");
/** Set the initial Niso values from a default Niso object. * This doesn't attempt to be complete, but sets * the values which we know could have been set from the * JP2 header. */ public void setDefaultNiso (NisoImageMetadata dNiso) { _niso.setByteOrder(dNiso.getByteOrder ()); _niso.setMimeType (dNiso.getMimeType ()); _niso.setBitsPerSample (dNiso.getBitsPerSample ()); _niso.setImageLength (dNiso.getImageLength ()); _niso.setImageWidth (dNiso.getImageWidth ()); _niso.setSamplesPerPixel (dNiso.getSamplesPerPixel ()); _niso.setCompressionScheme (dNiso.getCompressionScheme ()); _niso.setYSamplingFrequency (dNiso.getYSamplingFrequency ()); _niso.setXSamplingFrequency (dNiso.getXSamplingFrequency ()); _niso.setSamplingFrequencyUnit (dNiso.getSamplingFrequencyUnit ()); }
return false; niso.setSamplesPerPixel(nc); int bpc = ModuleBase.readUnsignedByte(_dstrm, _module); if (bpc != 255) {
checkType (tag, type, SHORT); checkCount (tag, count, 1); _niso.setSamplesPerPixel (readShort (type, count, value));