com.flagstone.transform.image
Class JPEGInfo

java.lang.Object
  extended by com.flagstone.transform.image.JPEGInfo

public final class JPEGInfo
extends Object

JPEGInfo is used to extract the width and height from a JPEG encoded image.


Field Summary
static int APP
          Marks the start of an application specific block.
static int COM
          Marks the start of an comment block.
static int DHT
          Marks the Huffman table.
static int DQT
          Marks the quantization table.
static int DRI
          Marks the restart interval.
static int EOI
          Marks the end of an image.
static int JPG
          Marks the start of a JPG block.
static int RST
          Marks a restart.
static int SOF0
          Marks the start of a frame - baseline DCT.
static int SOF2
          Marks the start of a frame - progressive DCT.
static int SOFF
          Marks the start of a JPG block.
static int SOI
          Marks the start of an image.
static int SOS
          Marks the start of scan.
 
Constructor Summary
JPEGInfo()
           
 
Method Summary
 void decode(byte[] image)
          Decode a JPEG encoded image.
 int getHeight()
          Return the height of the image in pixels, not twips.
 int getWidth()
          Get the width of the image in pixels, not twips.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOI

public static final int SOI
Marks the start of an image.

See Also:
Constant Field Values

EOI

public static final int EOI
Marks the end of an image.

See Also:
Constant Field Values

SOF0

public static final int SOF0
Marks the start of a frame - baseline DCT.

See Also:
Constant Field Values

SOF2

public static final int SOF2
Marks the start of a frame - progressive DCT.

See Also:
Constant Field Values

JPG

public static final int JPG
Marks the start of a JPG block.

See Also:
Constant Field Values

SOFF

public static final int SOFF
Marks the start of a JPG block.

See Also:
Constant Field Values

DHT

public static final int DHT
Marks the Huffman table.

See Also:
Constant Field Values

DQT

public static final int DQT
Marks the quantization table.

See Also:
Constant Field Values

DRI

public static final int DRI
Marks the restart interval.

See Also:
Constant Field Values

SOS

public static final int SOS
Marks the start of scan.

See Also:
Constant Field Values

RST

public static final int RST
Marks a restart.

See Also:
Constant Field Values

APP

public static final int APP
Marks the start of an application specific block.

See Also:
Constant Field Values

COM

public static final int COM
Marks the start of an comment block.

See Also:
Constant Field Values
Constructor Detail

JPEGInfo

public JPEGInfo()
Method Detail

getWidth

public int getWidth()
Get the width of the image in pixels, not twips.

Returns:
the width of the image

getHeight

public int getHeight()
Return the height of the image in pixels, not twips.

Returns:
the height of the image

decode

public void decode(byte[] image)
Decode a JPEG encoded image.

Parameters:
image - the image data.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.