Home | Русский

J2ME – How to write – read image in – from RMS

The example below saves image file into RMS and shows it on mobile.
Data like image, image name, width, height can be stored in RMS.
The size of the image file do matters if phone capacity is small.
Sample.java

package freesrc.com;

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.*;

/**
* @author freesrc.com
*/
public class Sample extends MIDlet {

private Display [...]

Posted in: J2ME by admin No Comments , , , ,

Convert ARGB to RGB in J2ME

Creating an image from an array of data is an easy task, but to create a byte-array of data from an image is a little more complicated.
To create a byte-array of data from an image, we can use the getRGB(..) method in the image class in MIDP 2.0.
From the getRGB method we get an int-array [...]

Posted in: J2ME by admin No Comments , ,