blackberry - How do I create a EncodedImage from a javax.microedition.lcdui.Image -
i developing j2me application blackberry. download large gif , want scale image fit screen. looking better performance scaling image using using approaches this.
i haven't used microedition image myself, i've worked rim's image class recently, , seems least-common-denominator representation array of rgb values. see lcdui.image has method
getrgb(int[] rgbdata, int offset, int scanlength, int x, int y, int width, int height) which should give array need. can rim bitmap or image or pngencodedimage with
bitmap.setargb(int[] data, int offset, int scanlength, int left, int top, int width, int height) imagefactory.createimage(bitmap bitmap) pngencodedimage.encode(bitmap bitmap)
Comments
Post a Comment