×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2004
    Location
    quezon city philippines
    Posts
    25

    Question URGENT: how to save Image to JPEG Format?

    Creating a file makes use of FileConncetion class of jsr 75 and OutputStream Class of MIDP.

    Is there any way to create a jpeg file from the information from an image created from MIDP Image.createImage(...) methods?
    Urgent, pls help..

  2. #2
    Regular Contributor
    Join Date
    Aug 2003
    Location
    uk
    Posts
    232
    Yes.

    Step 1: understand the jpeg formet (I don't)

    Step 2: manually write the bytes into a file yourself ..

    And by file I mean RMS.

    You wont be able to write the file to the phones gallery as that would be escaping the java sandbox ..

    Which begs the question: why bother ?
    Though I suppose if you are creating a picture taking application, this would be the only way to save the pictures, and jpeg's might be the best compression.

    You would have to manually decode them again when you load them too.

    jpeg is not an easy format though:

    Read this for more info:

    http://dynamo.ecn.purdue.edu/~ace/jp.../jpegtut1.html

  3. #3
    Registered User
    Join Date
    Dec 2004
    Location
    quezon city philippines
    Posts
    25
    thanks for the quick reply...i'll check on the link! Thanks again..

Posting Permissions

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