×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    3

    OutputStream & images

    Hi! I´m developing an application to be installed in two devices. My problem is that i want to send an image: I can receive it with createImage(InputStream ip), but how can i send it with OutputStream? it needs a byte array (method write), how can i convert an image into a byte array?is there any other solution? like send it as a string...

    Thanks

  2. #2
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    1. If you don't create image on the fly, you are probably constructing it from the file and/or some stream. Then just send this file/stream.

    2. Use Nokia UI libs to convert image into bytes array

    3. Use MIDP 2

    4. There were some posts from the people who managed to parse PNG format from J2ME. I suppose that it is complex, but if it is not, you can construct image file by following PNG specification

    5. Almost same as item 4. If you construct image on the fly, you know what you are doing. Perform same operations with some byte array

Posting Permissions

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