Hi,
I want to save the image with the editable portion. That is i have added line and text on the image. I need to save the image including the text and line.
Hi,
I want to save the image with the editable portion. That is i have added line and text on the image. I need to save the image including the text and line.
Hi,
as far as I know, if you've got an Image object with J2me, there's no way to get raw byte data to save it somewhere. An alternative would be to get RGB data with getRGB() method and then recreate the image itself with createRGBImage().
An (old) example on image serializing:
http://developer.sonyericsson.com/si..._java_0502.jsp
Hope it helps,
Pit
Hi,
If i recreate the image using createRGB() method then it is possible to save that image.
Sure, you can recreate the Image with the RGB data got with getRGB().
Pit
A simple example:
PitCode:Image original = Image.createImage(getClass().getResourceAsStream("/icon.png")); int width = original.getWidth(); int height = original.getHeight(); int[] rgbData = new int[width * height]; original.getRGB(rgbData, 0, width, 0, 0, width, height); Image recreated = Image.createRGBImage(rgbData, width, height, true);
Hi
I have tried that code. Now i want to know where the image stored and how to read the stored image.
You can store the image data using RMS or FileConnection APIs. You can find API references here:
RMS: http://java.sun.com/javame/reference...e-summary.html
FileConnection: http://www.forum.nokia.com/document/...B2A/index.html
Pit
If i stored the png file in rms then i want to open the saved image and make some changes. Now i want to save the current image. It is possible?
With RMS you can easily read/write data (check addRecord() and getRecord() methods)
Pit
addRecord(),getRecord() using this method new record is added and readed. This is used for text format. Eventhough these methods used for image means then how the editable portion can save.
I'm not sure I've understood your problem. Anyway, addRecord() and getRecord() methods work with byte[] data, so you can effectively store/read anything within RMS.
Pit
Any other alternative available for saving image including the editable portion rather than rms and fileconnection.
U might want to look into the JSR75 PDA Optional Packages for the J2ME Platform... Im not sure if its possible to write to a file instead of the RMS with this JSR but u might want to find that out...
Can anyone know how to save the image with editable portion.
Please help me its urgent.