niso.setImageWidth (width); int height = readUnsignedShort (_dstream); niso.setImageLength (height); int packedFields = readUnsignedByte (_dstream, this); int interlaceFlag = (packedFields & 0X40) >> 6;
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; } }
PdfObject heightBase = xobdict.get(DICT_KEY_HEIGHT); PdfSimpleObject htObj = (PdfSimpleObject) resolveIndirectObject(heightBase); niso.setImageLength(htObj.getIntValue());
skipBytes(_dstream, length - 8, this); _seenJPEGL = true; _niso.setImageLength(nLines); _niso.setImageWidth(samPerLine); int[] bps = new int[numComps];
NisoImageMetadata thumbNiso = new NisoImageMetadata(); thumbNiso.setImageWidth(xThumbPix); thumbNiso.setImageLength(yThumbPix); thumbNiso.setColorSpace(2); // RGB thumbNiso.setCompressionScheme(1); // uncompressed NisoImageMetadata thumbNiso = new NisoImageMetadata(); thumbNiso.setImageWidth(xThumbPix); thumbNiso.setImageLength(yThumbPix); thumbNiso.setColorSpace(extCode == 0X13 ? 2 : 3); thumbNiso.setCompressionScheme(1); // uncompressed
_nisoMetadata.setImageLength (height); int[] bits = { bitDepth }; _nisoMetadata.setBitsPerSample (bits);
/** 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 ()); }
readUnsignedByte(_dstream, this); long height = readUnsignedInt(_dstream); _niso.setImageLength(height); long width = readUnsignedInt(_dstream); _niso.setImageWidth(width);
niso.setImageLength (height); long width = _module.readUnsignedInt (_dstrm); niso.setImageWidth (width);
checkType (tag, type, SHORT, LONG); checkCount (tag, count, 1); _niso.setImageLength (readLong (type, count, value));