×

Discussion Board

Results 1 to 3 of 3

Thread: Image array

  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    80

    Image array

    I want to create image array. How do i do it?

    Image[] imageArray = new Image[numberOfElement];
    is this how to initialize?

    Image image = createImage("/i.png");
    imageArray[1] = image;
    is this how to insert an image into array?

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Re: Image array

    Yes, going right - look at following:

    PHP Code:
    Image[] imageArray = new Image[numberOfElement]; 
    imageArray[0] = Image.createImage("/i.png"); 
    No need of an extra variable. And you may need to surround createImage call by a try catch block.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Image array

    Works both the way's but should be used in try catch block.

    thanks,
    ~Amitabh

Similar Threads

  1. Converting image object into byte array
    By kamalinfo2k2@yahoo.com in forum Mobile Java General
    Replies: 7
    Last Post: 2011-02-26, 10:57
  2. How to convert image into byte array
    By dhiraj.deka in forum Mobile Java General
    Replies: 6
    Last Post: 2009-11-23, 09:23
  3. Display jpg image from byte array
    By arpit2agrawal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 15
    Last Post: 2009-01-07, 16:22
  4. saving jpeg image on grid list
    By flicker82 in forum Symbian
    Replies: 0
    Last Post: 2005-01-21, 04:22
  5. Loading Image data from 'raw' bytes
    By LongSteve in forum Mobile Java General
    Replies: 2
    Last Post: 2002-11-20, 17: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
  •  
×