|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.yura.mobile.util.ImageUtil
public class ImageUtil
Field Summary | |
---|---|
static int |
LARGESTBYTESTREAM
|
static int |
THUMB_MAX_SIZE
|
Constructor Summary | |
---|---|
ImageUtil()
|
Method Summary | |
---|---|
static javax.microedition.lcdui.Image |
colorize(javax.microedition.lcdui.Image original,
int newColor)
|
static javax.microedition.lcdui.Image |
createImage(InputStream is,
int cW,
int cH)
Get a scaled image directly from inputstream |
static javax.microedition.lcdui.Image |
createImage(String filename,
int cW,
int cH)
Created a sized Image from a file |
static javax.microedition.lcdui.Image |
getJPEGthumb(byte[] fileBytes)
Get a thumbnail image from a byte array |
static javax.microedition.lcdui.Image |
getScaledImage(javax.microedition.lcdui.Image dispImage,
int width,
int height)
Scale and resize image to fit our screen |
static javax.microedition.lcdui.Image |
getThumbFromFile(InputStream str)
Traverse an inputStream and return a thumbnail image if any. |
static javax.microedition.lcdui.Image |
imageColor(javax.microedition.lcdui.Image image,
int i)
replaces all values of the blue channel with a color |
static void |
imageColor(int[] pixels,
int color)
|
static javax.microedition.lcdui.Image |
makeImage(int w,
int h,
int color)
|
static javax.microedition.lcdui.Image |
resize(javax.microedition.lcdui.Image inImage,
int rotation,
int scaleFactor,
int scalePwr)
Fit the image on our screen size (width, height) |
static javax.microedition.lcdui.Image |
scaleImage(javax.microedition.lcdui.Image img,
int newW,
int newH)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int LARGESTBYTESTREAM
public static int THUMB_MAX_SIZE
Constructor Detail |
---|
public ImageUtil()
Method Detail |
---|
public static javax.microedition.lcdui.Image colorize(javax.microedition.lcdui.Image original, int newColor)
public static javax.microedition.lcdui.Image createImage(InputStream is, int cW, int cH)
is
- resource input streamcW
- screen widthcH
- screen height
public static javax.microedition.lcdui.Image createImage(String filename, int cW, int cH) throws IOException, IOException
filename
- name of the image filecW
- device widthcH
- device height
IOException
public static javax.microedition.lcdui.Image getJPEGthumb(byte[] fileBytes)
fileBytes
-
public static javax.microedition.lcdui.Image getScaledImage(javax.microedition.lcdui.Image dispImage, int width, int height)
dispImage,
- the imagewidth
- , max widthheigth,
- max height
public static javax.microedition.lcdui.Image getThumbFromFile(InputStream str) throws IOException
str
- the stream
IOException
public static final javax.microedition.lcdui.Image imageColor(javax.microedition.lcdui.Image image, int i)
public static final void imageColor(int[] pixels, int color)
public static javax.microedition.lcdui.Image makeImage(int w, int h, int color)
public static javax.microedition.lcdui.Image resize(javax.microedition.lcdui.Image inImage, int rotation, int scaleFactor, int scalePwr)
inImage
- the image to be resizedscaleFactor
- the factor with which we want to scalescalePwr
- shift width/height scalePwr bits
public static javax.microedition.lcdui.Image scaleImage(javax.microedition.lcdui.Image img, int newW, int newH)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |