Join Today
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008
    Location
    Monterrey,Mexico
    Posts
    4

    Default help with Images

    Hello everyone! I wrote a simple midlet for my A1200 to draw on a canvas. I use the Image class to draw on it. Now I would like to save that Image into a jpg file. I have managed to get a byte array to save to a file, but I still cant see what I draw. Any ideas on how to get the bytes from an image?

  2. #2

    Default

    I didn't know whether you code on kjava paltform
    this is some java code :
    ==========================
    Image image = createImage("your file name");
    int width = image.getWidth();
    int height = image.getHeight();
    int []pixels32 = new int[width * bitmap];
    image.getRGB(pixels32, 0, width, 0, 0, width, height);
    =============================
    BTW:if you still can't get a byte array from image, you may try to png


 
+ Reply to Thread

Similar Threads

  1. BRAIN TEASER: What do these IMAGES represent?
    By achyudhram in forum -The Lounge-
    Replies: 35
    Last Post: 10-23-2009, 07:19 AM
  2. How to add images in picture flow
    By vivek_033 in forum E6 General Chat
    Replies: 11
    Last Post: 12-19-2008, 04:53 AM
  3. Changing power_up and power_down images
    By spock in forum A910 General Chat
    Replies: 1
    Last Post: 08-20-2008, 04:04 PM
  4. Checking your firmware (how to with images)
    By sobers_2002 in forum A1200 General Chat
    Replies: 2
    Last Post: 07-12-2007, 01:34 PM
  5. forum images
    By Err0r in forum Comments/Suggestions
    Replies: 3
    Last Post: 08-09-2005, 09:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1