Top Description Fields Constructors Methods
jogamp.opengl.util.pngj

public Class ImageLines

extends Object
Class Inheritance
Imports
jogamp.opengl.util.pngj.ImageLine.SampleType

Wraps in a matrix a set of image rows, not necessarily contiguous - but equispaced. The fields mirrors those of ImageLine, and you can access each row as a ImageLine backed by the matrix row, see getImageLineAtMatrixRow(int)

Field Summary

Modifier and TypeField and Description
public final int
public final int
public final int
public final ImageInfo
public final int
public final int
public final int
public final boolean
public final ImageLine.SampleType
public final int[][]
public final byte[][]

Constructor Summary

AccessConstructor and Description
public
ImageLines(final ImageInfo imgInfo, final ImageLine.SampleType stype, final boolean unpackedMode, final int rowOffset, final int nRows, final int rowStep)

Allocates a matrix to store nRows image rows.

Method Summary

Modifier and TypeMethod and Description
public ImageLine

Returns:

A new ImageLine, backed by the matrix, with the correct ('real') rownumber
getImageLineAtMatrixRow
(final int
Matrix row, from 0 to nRows This is not necessarily the image row, see imageRowToMatrixRow(int) and matrixRowToImageRow(int)
mrow
)

Returns a ImageLine is backed by the matrix, no allocation done

public int
imageRowToMatrixRow(final int imrow)

Warning

this always returns a valid matrix row (clamping on 0 : nrows-1, and rounding down) Eg: rowOffset=4,rowStep=2 imageRowToMatrixRow(17) returns 6 , imageRowToMatrixRow(1) returns 0

public int
imageRowToMatrixRowStrict(int imrow)

Same as imageRowToMatrixRow, but returns negative if invalid

public int

Returns:

Image row number. Invalid only if mrow is invalid
matrixRowToImageRow
(final int
Matrix row number
mrow
)

Converts from matrix row number (0 : nRows-1) to image row number

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bitDepthback to summary
public final int bitDepth
channelsback to summary
public final int channels
elementsPerRowback to summary
public final int elementsPerRow
imgInfoback to summary
public final ImageInfo imgInfo
nRowsback to summary
public final int nRows
rowOffsetback to summary
public final int rowOffset
rowStepback to summary
public final int rowStep
samplesUnpackedback to summary
public final boolean samplesUnpacked
sampleTypeback to summary
public final ImageLine.SampleType sampleType
scanlinesback to summary
public final int[][] scanlines
scanlinesbback to summary
public final byte[][] scanlinesb

Constructor Detail

ImageLinesback to summary
public ImageLines(final ImageInfo imgInfo, final ImageLine.SampleType stype, final boolean unpackedMode, final int rowOffset, final int nRows, final int rowStep)

Allocates a matrix to store nRows image rows. See ImageLine and PngReader#readRowsInt() PngReader#readRowsByte()

Method Detail

getImageLineAtMatrixRowback to summary
public ImageLine getImageLineAtMatrixRow(final int mrow)

Returns a ImageLine is backed by the matrix, no allocation done

Parameters
mrow:int

Matrix row, from 0 to nRows This is not necessarily the image row, see imageRowToMatrixRow(int) and matrixRowToImageRow(int)

Returns:ImageLine

A new ImageLine, backed by the matrix, with the correct ('real') rownumber

imageRowToMatrixRowback to summary
public int imageRowToMatrixRow(final int imrow)

Warning

this always returns a valid matrix row (clamping on 0 : nrows-1, and rounding down) Eg: rowOffset=4,rowStep=2 imageRowToMatrixRow(17) returns 6 , imageRowToMatrixRow(1) returns 0

imageRowToMatrixRowStrictback to summary
public int imageRowToMatrixRowStrict(int imrow)

Same as imageRowToMatrixRow, but returns negative if invalid

matrixRowToImageRowback to summary
public int matrixRowToImageRow(final int mrow)

Converts from matrix row number (0 : nRows-1) to image row number

Parameters
mrow:int

Matrix row number

Returns:int

Image row number. Invalid only if mrow is invalid