PngCs  1.1.4
A C# library for read/write PNG images
Public Member Functions | Properties | List of all members
Hjg.Pngcs.ImageLines Class Reference

Wraps a set of rows from a image, read in a single operation, stored in a int[][] or byte[][] matrix More...

Public Member Functions

 ImageLines (global::Hjg.Pngcs.ImageInfo ImgInfo, global::Hjg.Pngcs.ImageLine.ESampleType sampleType, bool unpackedMode, int rowOffset, int nRows, int rowStep)
 
int ImageRowToMatrixRow (int imrow)
 Translates from image row number to matrix row. If you are not sure if this image row in included, use better ImageRowToMatrixRowStrict
 
int ImageRowToMatrixRowStrict (int imrow)
 translates from image row number to matrix row
 
int MatrixRowToImageRow (int mrow)
 Translates from matrix row number to real image row number
 
ImageLine GetImageLineAtMatrixRow (int mrow)
 Constructs and returns an ImageLine object backed by a matrix row. This is quite efficient, no deep copy.
 

Properties

ImageInfo ImgInfo [get, set]
 
ImageLine.ESampleType sampleType [get, set]
 
bool SamplesUnpacked [get, set]
 
int RowOffset [get, set]
 
int Nrows [get, set]
 
int RowStep [get, set]
 
int[][] Scanlines [get, set]
 
byte[][] ScanlinesB [get, set]
 

Detailed Description

Wraps a set of rows from a image, read in a single operation, stored in a int[][] or byte[][] matrix

They can be a subset of the total rows, but in this case they are equispaced.

See also ImageLine

Constructor & Destructor Documentation

Hjg.Pngcs.ImageLines.ImageLines ( global::Hjg.Pngcs.ImageInfo  ImgInfo,
global::Hjg.Pngcs.ImageLine.ESampleType  sampleType,
bool  unpackedMode,
int  rowOffset,
int  nRows,
int  rowStep 
)

Member Function Documentation

int Hjg.Pngcs.ImageLines.ImageRowToMatrixRow ( int  imrow)

Translates from image row number to matrix row. If you are not sure if this image row in included, use better ImageRowToMatrixRowStrict

Parameters
imrowRow number in the original image (from 0)
Returns
Row number in the wrapped matrix. Undefined result if invalid
int Hjg.Pngcs.ImageLines.ImageRowToMatrixRowStrict ( int  imrow)

translates from image row number to matrix row

Parameters
imrowRow number in the original image (from 0)
Returns
Row number in the wrapped matrix. Returns -1 if invalid
int Hjg.Pngcs.ImageLines.MatrixRowToImageRow ( int  mrow)

Translates from matrix row number to real image row number

Parameters
mrow
Returns
ImageLine Hjg.Pngcs.ImageLines.GetImageLineAtMatrixRow ( int  mrow)

Constructs and returns an ImageLine object backed by a matrix row. This is quite efficient, no deep copy.

Parameters
mrowRow number inside the matrix
Returns

Property Documentation

ImageInfo Hjg.Pngcs.ImageLines.ImgInfo
getset
ImageLine.ESampleType Hjg.Pngcs.ImageLines.sampleType
getset
bool Hjg.Pngcs.ImageLines.SamplesUnpacked
getset
int Hjg.Pngcs.ImageLines.RowOffset
getset
int Hjg.Pngcs.ImageLines.Nrows
getset
int Hjg.Pngcs.ImageLines.RowStep
getset
int [][] Hjg.Pngcs.ImageLines.Scanlines
getset
byte [][] Hjg.Pngcs.ImageLines.ScanlinesB
getset