|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectar.com.hjg.pngj.ImageLineHelper
public class ImageLineHelper
Bunch of utility static methods to process/analyze an image line at the pixel level.
Not essential at all, some methods are probably to be removed if future releases.
Constructor Summary | |
---|---|
ImageLineHelper()
|
Method Summary | |
---|---|
static int |
clampTo_0_255(int i)
|
static int |
clampTo_0_65535(int i)
|
static int |
clampTo_128_127(int x)
|
static int |
double2int(ImageLine line,
double d)
|
static int |
double2intClamped(ImageLine line,
double d)
|
static int |
getPixelARGB8(ImageLine line,
int column)
|
static int |
getPixelRGB8(ImageLine line,
int column)
integer packed R G B only for bitdepth=8! |
static String |
infoFirstLastPixels(ImageLine line)
Just for basic info or debugging. |
static String |
infoFull(ImageLine line)
|
static double |
int2double(ImageLine line,
int p)
|
static double |
int2doubleClamped(ImageLine line,
int p)
|
int[] |
PalIdx2RGB(ImageLine line,
PngChunkPLTE pal,
int[] buf)
Given an indexed line with a palette, unpacks as a RGB array |
static void |
setPixelRGB8(ImageLine line,
int col,
int rgb)
|
static void |
setPixelRGB8(ImageLine line,
int col,
int r,
int g,
int b)
|
static void |
setPixelsRGB8(ImageLine line,
int[] rgb)
|
static void |
setValD(ImageLine line,
int i,
double d)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageLineHelper()
Method Detail |
---|
public static int clampTo_0_255(int i)
public static int clampTo_0_65535(int i)
public static int clampTo_128_127(int x)
public static int double2int(ImageLine line, double d)
public static int double2intClamped(ImageLine line, double d)
public static int getPixelARGB8(ImageLine line, int column)
public static int getPixelRGB8(ImageLine line, int column)
public static String infoFirstLastPixels(ImageLine line)
public static String infoFull(ImageLine line)
public static double int2double(ImageLine line, int p)
public static double int2doubleClamped(ImageLine line, int p)
public int[] PalIdx2RGB(ImageLine line, PngChunkPLTE pal, int[] buf)
line
- ImageLine as returned from PngReaderpal
- Palette chunkbuf
- Preallocated array, optional
public static void setPixelRGB8(ImageLine line, int col, int rgb)
public static void setPixelRGB8(ImageLine line, int col, int r, int g, int b)
public static void setPixelsRGB8(ImageLine line, int[] rgb)
public static void setValD(ImageLine line, int i, double d)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |