Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    14

    Question Getting IOException while creatimg image

    Hi All,


    Im trying to append an image to Form using J2ME polish.
    I have created a package in which i created two packages
    1) UI 2) Images
    Imags contains all images that are to be append on form.
    UI contain form.

    Image image = Image.createImage("/sample/images/image.gif");
    img1 = new ImageItem("header", image, ImageItem.LAYOUT_CENTER, "");
    append(img1);


    This my snippet. But it is giving IOException.

    If anybody knows solution for this PLZ LET ME KNOW.

    THANKS

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Getting IOException while creatimg image

    createImage throws
    IOException - if the resource does not exist, the data cannot be loaded, or the image data cannot be decoded

    So, does the file exist inside the JAR file in the directory you have defined in your code?
    Does the phone support gif images?

    Hartti

  3. #3
    Registered User
    Join Date
    May 2007
    Posts
    14

    Exclamation Re: Getting IOException while creatimg image

    I got the solution problem was with path. FOr polish we dont have to give path just give /name of image and store images in resources/base/images folder

Similar Threads

  1. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 07:34
  2. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  3. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 10:58
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 16:31
  5. Loading Image data from 'raw' bytes
    By LongSteve in forum Mobile Java General
    Replies: 2
    Last Post: 2002-11-20, 18:38

Posting Permissions

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