com.lowagie.text

Class Jpeg2000

public class Jpeg2000 extends Image

An Jpeg2000 is the representation of a graphic element (JPEG) that has to be inserted into the document

See Also: Element Image

Field Summary
intboxLength
intboxType
InputStreaminp
static intJP2_BPCC
static intJP2_COLR
static intJP2_DBTL
static intJP2_FTYP
static intJP2_IHDR
static intJP2_JP
static intJP2_JP2
static intJP2_JP2C
static intJP2_JP2H
static intJP2_URL
static intJPIP_JPIP
Constructor Summary
Jpeg2000(Image image)
Jpeg2000(URL url)
Constructs a Jpeg2000-object, using an url.
Jpeg2000(byte[] img)
Constructs a Jpeg2000-object from memory.
Jpeg2000(byte[] img, float width, float height)
Constructs a Jpeg2000-object from memory.
Method Summary
intcio_read(int n)
voidjp2_read_boxhdr()
voidprocessParameters()
This method checks if the image is a valid JPEG and processes some parameters.

Field Detail

boxLength

int boxLength

boxType

int boxType

inp

InputStream inp

JP2_BPCC

public static final int JP2_BPCC

JP2_COLR

public static final int JP2_COLR

JP2_DBTL

public static final int JP2_DBTL

JP2_FTYP

public static final int JP2_FTYP

JP2_IHDR

public static final int JP2_IHDR

JP2_JP

public static final int JP2_JP

JP2_JP2

public static final int JP2_JP2

JP2_JP2C

public static final int JP2_JP2C

JP2_JP2H

public static final int JP2_JP2H

JP2_URL

public static final int JP2_URL

JPIP_JPIP

public static final int JPIP_JPIP

Constructor Detail

Jpeg2000

Jpeg2000(Image image)

Jpeg2000

public Jpeg2000(URL url)
Constructs a Jpeg2000-object, using an url.

Parameters: url the URL where the image can be found

Throws: BadElementException IOException

Jpeg2000

public Jpeg2000(byte[] img)
Constructs a Jpeg2000-object from memory.

Parameters: img the memory image

Throws: BadElementException IOException

Jpeg2000

public Jpeg2000(byte[] img, float width, float height)
Constructs a Jpeg2000-object from memory.

Parameters: img the memory image. width the width you want the image to have height the height you want the image to have

Throws: BadElementException IOException

Method Detail

cio_read

private int cio_read(int n)

jp2_read_boxhdr

public void jp2_read_boxhdr()

processParameters

private void processParameters()
This method checks if the image is a valid JPEG and processes some parameters.

Throws: IOException