net.sourceforge.jiu.codecs.jpeg
Class JPEGMarkerReader
java.lang.Object
net.sourceforge.jiu.codecs.jpeg.JPEGMarkerReader
public class JPEGMarkerReader
extends java.lang.Object
Static helper methods to read various JPEG bitstream headers from a
java.io.DataInput
source into objects of the appropriate
data classes.
Objects are then added to a
JPEGData
object.
JPEGMarkerReader
private JPEGMarkerReader()
Private constructor to prevent instantiation.
readQuantizationTables
public static void readQuantizationTables(DataInput in,
JPEGData jpegData,
int length)
throws InvalidFileStructureException,
IOException
Read quantization tables from a DQT marker.
P&M 7.8.3, p. 118f.
jpegData
- data object which will store the table(s)length
- length of marker
readStartOfScan
public static void readStartOfScan(DataInput in,
JPEGData jpegData,
int length)
throws InvalidFileStructureException,
IOException,
UnsupportedTypeException
Read an SOS (start of scan) marker.
P&M 7.6, p. 113.
in
- source to read marker information fromjpegData
- JPEGData
object to update with information from the markerlength
- size of marker in bytes