Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2008

    Post Image Transparency issue - Help me out ....


    I want to create a transparent RGBImage on the background image(this is not transparent). and i want to draw other non-transparent image on top of RGBImage using RGBImage drawImage method. how can i do this ? i want a final image from that RGNImage getImage() method so that i can draw it on canvas.


    RGBimage rgbImage= new RGBImage(200,235);
    rgbImage.setcolor(0xaa, 0xff, 0xff,0xff) // 0xaa is the transparency value

    rgbImage.fillRect(0, 0, 220, 235); // fill entire image with the specified colour

    //Draw non transparent Top Images on the transparent image
    rgbImage.drawImage(sprite1, 10, 120, Graphics.TOP | Graphics.LEFT);
    rgbImage.drawImage(sprite2, 90, 150, Graphics.TOP | Graphics.LEFT);
    rgbImage.drawImage(sprite3, 10, 30, Graphics.TOP | Graphics.LEFT);

    finalImage = rgbImage.getImage();

    this is what i want to to use. How can i do this. I want to make a RGBImage Class.

    prompt response would be appriciated !

    currently what i'm doing is to create an mutable image then get the graphics object of that mutable image then i draw images using that graphics object on top of that image. then i change the alpha pixsels of that mutable image and then i create an image using RGB array. but this makes everything transparent. but i want top images non transparent. please help me out with this

    Tom cruise
    California, USA

  2. #2
    Registered User
    Join Date
    May 2008

    Post Re: Image Transparency issue - Help me out ....

    is anyone there to answer ?????

  3. #3
    Nokia Developer Expert
    Join Date
    May 2007
    Mexico D.F

    Lightbulb Re: Image Transparency issue - Help me out ....

    Hello there

    According to what I understood... all you need to do is using the game api of the MIDP 2.0 specification

    So have a look at the following classes:
    • GameCanvas ( a subclass of Canvas with game-related features)
    • Sprite (for animated sprites)
    • LayerManager (for managing Sprites and TiledLayers)

    You can create one Sprite out of one image (whatever the method you use for that is)
    Create a LayerManager and then add every Sprite to the LayerManayer as an independient layer... in this way you can manipulate every image separatedly.

    There is plenty of documentation in the MIDP 2.0 API.

    Besides, here's a complete example that uses the game API.


    Hope this helps


Similar Threads

  1. RTSP video streaming issue on 6280
    By olivier_irac in forum General Development Questions
    Replies: 0
    Last Post: 2006-12-04, 15:11
  2. How to set Image transparency for N-GAGE QD
    By joethegong in forum Mobile Java General
    Replies: 9
    Last Post: 2006-08-28, 09:45
  3. reinit an image with transparency
    By madalin_oprea in forum Mobile Java General
    Replies: 4
    Last Post: 2005-02-01, 15:16
  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