×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    19

    3650 and Image loading

    Is there any reason why the standard image loading doesn't work on a 3650:

    public synchronized void run()
    {
    Image img;
    try{
    img=Image.createImage("/myimage.png");
    }
    catch(IOException ex){
    // oops
    }

    ....
    }

    The loading is in a thread class to prevent system blockage.

    It throws an IO Exception everytime, but only on a 3650. All other phones have no problem, including the 7650.

    I've been developing in J2ME for two years now and I've never seen this before, and I use the same image loading routine for all my apps.

    Any clues would be greatly appreciated.

    R

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Hyderabad
    Posts
    181
    hi

    even i am working using 3650. i am able to load image but the run() mehtod is not synchronised in my application.

    may i know why you are making it synchronised.

    thanks

    raj

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    19
    To be honest, I think I put the synchronized in because I was running out of ideas to fix the problem. The method is not called more than once, so technically it is unnecessary. I was just trying every trick I could think of, just in case

    I was wondering if it was a question of image size. The image in question is about 21k and 608x568 (i.e. quite large). I'm getting an IOException rather than an OutOfMemoryException so I'm guessing this size is permitted, yes?

    r

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Hyderabad
    Posts
    181
    21 k shouldnt be a problem.....
    did you check this in series 60 content emulator? if not try this in series 60 content emulator.

    thanks

  5. #5
    Regular Contributor
    Join Date
    Jun 2003
    Location
    Hungary
    Posts
    414
    21 k shouldn't be a problem, but the uncompressed size in memory is 690688 byte (608x568x2byte)!

  6. #6
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    ross666
    Have you checked whether the image file is actually put to the jar and to the root folder?

    You might have changed development environment and different IDEs assume different default options about which files put to the JAR automaticaaly and to which folder.

  7. #7
    Regular Contributor
    Join Date
    Aug 2003
    Location
    Oldenburg, Germany
    Posts
    118
    I guess your image-file is too large for 3650. I had the same problem with a PNG file which was 21K. After our graphic artist reduced the file-size to 20K we had no problems with loading the file on Nokia 3650.

    Regards,
    Sebastian Szczygiel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×