×

Discussion Board

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

    Image to jpg file

    Hellow,

    Anybody knows how to pass a Image (instance of Image class) to a jpg file??

    I try this using the Image.getRGB() and then write using FileConnection and DataOutputStream
    but isn´t work, the file can't be opened, maybe I can´t write bytes like this, I don´t know.

    And I see in java SE have the ImageIO library but java ME doesn´t have, if anybody knows a similar
    library like ImageIO for java ME plz tell me.

    P.S.:The environment is java Me, MIDP 2.0 and IDE NetBeans (in a nokia 5130)

    plz I need help with this.
    thanks.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Image to jpg file

    There is code for a Java ME JPEG encoder.

    Hope that helps you.

    Graham.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: Image to jpg file

    thanks for your help, but is´t work, I used and throw me an exception "Out of memory Error java/lang/OutOfMemoryError"
    if anybody knows other solution plz tell me.

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Image to jpg file

    How big is the image (width and height)?

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: Image to jpg file

    thank you, I used a smaller image and it´s work very good, realy thanks.
    I am very grateful with you, I try to do this for a long time.

    tanks.

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Image to jpg file

    You might find this document useful.

    Graham.

Similar Threads

  1. Regarding BMCONV
    By sanah007 in forum Symbian
    Replies: 2
    Last Post: 2009-05-26, 12:47
  2. Rfile and saving image file received in MHFRunL() of socket.. kern exec 0 panic
    By sanee in forum Symbian Networking & Messaging (Closed)
    Replies: 14
    Last Post: 2008-11-03, 09:14
  3. Help needed with a 3gp file...
    By joedoe_1981 in forum Streaming and Video
    Replies: 0
    Last Post: 2007-07-18, 18:58

Posting Permissions

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