×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    5

    How to save a picture in RMS?

    Hi,

    My application needs to save a picture taken with the camera into the RMS for future use. How can I efficiently store/encode the picture, preferably without using non-standard API?

    Presently, I use MIDP-2 Image.getRGB() to access the picture bits and then drop alpha channel and "useless" bits, but the data is still tens of KB...

    Any idea?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    USA, FL
    Posts
    148
    you may compress it... into png for example

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    5
    Great idea, but how do you do that with standard MIDP?
    Is there a *small* PNG encoder/decoder? Well, the decoder is not really necessary as the Image constructor can recreate it from the PNG bytes...

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    USA, FL
    Posts
    148
    > Is there a *small* PNG encoder/decoder? Well, the decoder is not really necessary as the Image constructor can recreate it from the PNG bytes...

    Nope, AFAIK.
    Just go to google, search "png source code" and Java C C++ by your choice When I did such search ~6 months ago, I found pretty much. Just get and use ))

    Dima
    www.gameartists.com

  5. #5
    Registered User
    Join Date
    Dec 2003
    Posts
    5
    Adding a custom PNG encoder, with the CRC32 and zip code, is going to turn my application extra-fat :-(

    How couldn't they include it in the MIDP API???

Posting Permissions

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