-
Notifications
You must be signed in to change notification settings - Fork 2
Simple JavaME Image Processing classes
License
adamcohenrose/JavaMEImageProcessing
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Here's some sample code for using the LargeColour class:
LargeColour avgColour = getAverageColourFrom(image);
String choice = getChosenColour(avgColour);
private LargeColour getAverageColourFrom(Image image) {
int width = image.getWidth();
int height = image.getHeight();
int rgbaArray[] = new int[width * height];
image.getRGB(rgbaArray, 0, width, 0, 0, width, height);
return imageAverager.getAverageColourFrom(rgbaArray);
}
private String getChosenColour(LargeColour averageColour) {
String choice = "hackday";
if (LargeColour.PURPLE.differenceFrom(averageColour) < 60f) {
choice = "yahoo";
} else if (LargeColour.RED.differenceFrom(averageColour) < 60f) {
choice = "kizoom";
}
return choice;
}
About
Simple JavaME Image Processing classes
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published