| Reply | « Previous Thread | Next Thread » |
|
Hi everyone,
I have an application in which I get an Image from a server. This Image arrives in the form of an Array, which I then use to create the Image itself. The idea is to use this Image as a background (it may be a picture, or whatever)... Till now I've been using this Image to create a Sprite, which is then appended onto the LayerManager so as to becom a background... Now I'd like to know if there are other possibilities ? To begin with : is it necessary to create a Sprite out of this Image ? Is there a better (less resource-demanding way) of sending an Image from my (perl) server ? Right now I first have to create an array to store the received data, then I need to create an Image out of it an then create a Sprite... all this is actually pretty memory-demanding... Also for garbage collection, when is the best moment to call it ? after creating the image from the array ? or after creating the sprite ? and if I set the array to null is it possible to reuse it after receiving a new data-array ? Thanks in advance for any tips, hints and reactions :D |
|
Well, seeing ur query i looked into API's well i havent tried this but there is one more way in which case u r not needed to create Sprite out of image... wat u can do is, if u have ur background layer, getGraphics() for that image,then u can set it on background using Layer.paint(Graphics g).
Prakash |
| prakash.raman |
| View Public Profile |
| Find all posts by prakash.raman |
|
hhmm... dont get that....
are u saying to use the paint method instead of a layer ? or using the paint method and a layer ? cause that would kinda be double work ? Anyways thanks for taking time to help me ;) |
|
Quote:
Download the documentation and source codes from this example SheepDog game: http://sw.nokia.com/id/748737bb-3d12...de_v2_0_en.zip Here it explains all you wanted as above. Have fun and play the game. :) |
|
Quote:
Prakash |
| prakash.raman |
| View Public Profile |
| Find all posts by prakash.raman |
|
Quote:
But now another question arises :P Can I use TiledLayer for a big Image ? I tried (Image is 200x300) with a 4 by 5 array (50 by 60 pixels) but for some reason that wont work... |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem Sending more than one OBEX image | jogissa | Bluetooth Technology | 0 | 2007-09-21 11:10 |
| how to cut some part of Image | mshouab | Mobile Java Media (Graphics & Sounds) | 2 | 2006-08-04 10:05 |
| HELP: Mutable Image to Immutable Image? | rj_cybersilver | Mobile Java Media (Graphics & Sounds) | 1 | 2005-03-26 10:58 |
| 7650 Image Uploader strange problem | kamlesh_in | General Symbian C++ | 1 | 2003-08-25 16:06 |
| Sprites management remarks | atomictag | Mobile Java General | 0 | 1970-01-01 02:00 |