Package com.levigo.jadice.server.png
Class ImageLineSetBI
- java.lang.Object
-
- com.levigo.jadice.server.png.ImageLineSetBI
-
- All Implemented Interfaces:
ar.com.hjg.pngj.IImageLineSet<ImageLineBI>
public class ImageLineSetBI extends Object implements ar.com.hjg.pngj.IImageLineSet<ImageLineBI>
-
-
Constructor Summary
Constructors Constructor Description ImageLineSetBI(ar.com.hjg.pngj.ImageInfo imgInfo, ImageLineBI.Png2BufferedImageAdapter adapter)
ImageLineSetBI(ar.com.hjg.pngj.ImageInfo imgInfo, ImageLineBI.Png2BufferedImageAdapter adapter, boolean singleCursor, int nlines, int noffset, int step)
this constructor is for reading a PNG to a BufferedImageImageLineSetBI(BufferedImage bi, ImageLineBI.BufferedImage2PngAdapter adapter)
ImageLineSetBI(BufferedImage bi, ImageLineBI.BufferedImage2PngAdapter adapter, int nlines, int noffset, int step)
this constructor is for writing a PNG from an existing BufferedImage
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageLineBI
getImageLine(int row)
The row number here referers to the PNG, not the BI SeegetImageLineRawNum(int)
ar.com.hjg.pngj.IImageLine
getImageLineRawNum(int n)
The row number here is that of the BufferedImageboolean
hasImageLine(int n)
int
imageRowToMatrixRow(int imrow)
Converts from real image row to this object row number.int
imageRowToMatrixRowStrict(int imrow)
Same asimageRowToMatrixRow(int)
, but returns negative if invalidboolean
isForWritePng()
is this for write PNG or for write BufferredImage?int
matrixRowToImageRow(int mrow)
Converts from matrix row number (0 : nRows-1) to image row numberint
size()
-
-
-
Constructor Detail
-
ImageLineSetBI
public ImageLineSetBI(ar.com.hjg.pngj.ImageInfo imgInfo, ImageLineBI.Png2BufferedImageAdapter adapter, boolean singleCursor, int nlines, int noffset, int step)
this constructor is for reading a PNG to a BufferedImage
-
ImageLineSetBI
public ImageLineSetBI(ar.com.hjg.pngj.ImageInfo imgInfo, ImageLineBI.Png2BufferedImageAdapter adapter)
-
ImageLineSetBI
public ImageLineSetBI(BufferedImage bi, ImageLineBI.BufferedImage2PngAdapter adapter, int nlines, int noffset, int step)
this constructor is for writing a PNG from an existing BufferedImage
-
ImageLineSetBI
public ImageLineSetBI(BufferedImage bi, ImageLineBI.BufferedImage2PngAdapter adapter)
-
-
Method Detail
-
isForWritePng
public boolean isForWritePng()
is this for write PNG or for write BufferredImage?
-
getImageLine
public ImageLineBI getImageLine(int row)
The row number here referers to the PNG, not the BI SeegetImageLineRawNum(int)
- Specified by:
getImageLine
in interfacear.com.hjg.pngj.IImageLineSet<ImageLineBI>
-
getImageLineRawNum
public ar.com.hjg.pngj.IImageLine getImageLineRawNum(int n)
The row number here is that of the BufferedImage
-
hasImageLine
public boolean hasImageLine(int n)
- Specified by:
hasImageLine
in interfacear.com.hjg.pngj.IImageLineSet<ImageLineBI>
-
size
public int size()
- Specified by:
size
in interfacear.com.hjg.pngj.IImageLineSet<ImageLineBI>
-
imageRowToMatrixRowStrict
public int imageRowToMatrixRowStrict(int imrow)
Same asimageRowToMatrixRow(int)
, but returns negative if invalid
-
matrixRowToImageRow
public int matrixRowToImageRow(int mrow)
Converts from matrix row number (0 : nRows-1) to image row number- Parameters:
mrow
- Matrix row number- Returns:
- Image row number. Returns trash if mrow is invalid
-
imageRowToMatrixRow
public int imageRowToMatrixRow(int imrow)
Converts from real image row to this object row number.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
-
-