|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iproject.wbmpcreator.WBMPFilter
Field Summary | |
static int |
CHANNEL_BLUE
A constant representing blue channel |
static int |
CHANNEL_GREEN
A constant representing green channel |
static int |
CHANNEL_RED
A constant representing red channel |
static int |
FILTER_DITHER_BURKE
Filter converting images to monochrome mode by using Burke method |
static int |
FILTER_DITHER_FLOYD_STEINBERG
Filter converting images to monochrome mode by using Floyd Steinberg method |
static int |
FILTER_DITHER_JARVIS
Filter converting images to monochrome mode by using Jarvis method |
static int |
FILTER_DITHER_ORDER_3X3
Filter converting images to monochrome mode by using ordered dithered method with 3x3 conversion array |
static int |
FILTER_DITHER_ORDER_4X4
Filter converting images to monochrome mode by using ordered dithered method with 4x4 conversion array |
static int |
FILTER_DITHER_STUCKI
Filter converting images to monochrome mode by using Stucki method |
static int |
FILTER_MONOCHROME
Filter converting images to monochrome mode by using average threshold |
Constructor Summary | |
WBMPFilter()
Empty constructor. |
Method Summary | |
WBMPfile |
complexImageFilter(int[][] image,
int length,
int width,
int filter_type)
This method is used for converting complicated images into WBMP. |
int |
getBlueThreshold()
Method to get the red threshold |
int |
getGreenThreshold()
Method to get the red threshold |
int |
getRedThreshold()
Method to get the red threshold |
void |
setBlueThreshold(int newBlueThreshold)
Method to set the blue threshold |
void |
setGreenThreshold(int newGreenThreshold)
Method to set the green threshold |
void |
setRedThreshold(int newRedThreshold)
Method to set the red threshold |
void |
setThreshold(int newThreshold)
Method to set threshold. |
int[][] |
simpleImageFilter(int[][] image,
int length,
int width,
int filter_type)
Method to perform filtering. |
int[][] |
simpleImageFilter(int[][] image,
int length,
int width,
int filter_type,
int threshold)
Method to perform filtering. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int FILTER_MONOCHROME
public static final int FILTER_DITHER_ORDER_4X4
public static final int FILTER_DITHER_ORDER_3X3
public static final int FILTER_DITHER_BURKE
public static final int FILTER_DITHER_FLOYD_STEINBERG
public static final int FILTER_DITHER_JARVIS
public static final int FILTER_DITHER_STUCKI
public static final int CHANNEL_RED
public static final int CHANNEL_GREEN
public static final int CHANNEL_BLUE
Constructor Detail |
public WBMPFilter()
Method Detail |
public int[][] simpleImageFilter(int[][] image, int length, int width, int filter_type)
image
- the int[][] array of points representing imagelength
- length of the imagewidth
- width of the imagefilter_type
- type of filterpublic WBMPfile complexImageFilter(int[][] image, int length, int width, int filter_type)
// open image from URL URL url = new URL(_your_URL_for_the_image_); SimpleImageFile x = new SimpleImageFile(url); // imstantiate the filter WBMPFilter wf=new WBMPFilter(); // apply the dithering method with 4x4 array (you may substitute it with 3x3 array) WBMPfile y=wf.complexImageFilter(x.getPointArray(),x.getLength(), x.getWidth(),wf.FILTER_DITHER_ORDER_4X4); // save image (you may put it to the stream or // save in the other graphical format) y.saveWBMP2File(_your_filename_for_WBMP_image_);
public int[][] simpleImageFilter(int[][] image, int length, int width, int filter_type, int threshold)
image
- the int[][] array of points representing imagelength
- length of the imagewidth
- width of the imagefilter_type
- type of filterthreshold
- type of threshold to be automatically set. Can be
combined like the following: CHANNEL_RED+CHANNEL_BLUE
- thus the thresholds for RED and BLUE will be counted,
and for GREEN channel it will be set to 128. The old
values of thresholds will be lost.public void setThreshold(int newThreshold)
newThreshold
- the new threshold value for all color channelspublic void setRedThreshold(int newRedThreshold)
newRedThreshold
- the new red threshold value for the red channelpublic int getRedThreshold()
public void setGreenThreshold(int newGreenThreshold)
newGreenThreshold
- the new green threshold value for the green channelpublic int getGreenThreshold()
public void setBlueThreshold(int newBlueThreshold)
newBlueThreshold
- the new blue threshold value for the blue channelpublic int getBlueThreshold()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |