×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    2

    Question How to save a drawing in png or jpg format ?

    Hi,

    I am working on a signature capturing application using J2ME MIDP 2.0 for PDA.

    I am taking signatures as a drawing on a CustomItem.

    Now, i want to send it to a php script running on Apache server to save this signature as a PNG, jpeg or any image file at server end.

    or how can i save this drawing on my local file system as a png or any other type of image file.

    Plz help if anybody knows the right way....

    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: How to save a drawing in png or jpg format ?

    Hi,

    to upload your files from a Java ME app to an HTTP server, you can follow the approach (and code) described in this article:

    http://wiki.forum.nokia.com/index.ph...load_with_J2ME

    Instead, to save your data on mobile phone local filesystem, you should use FileConnection API. For a detailed introduction (and sample code) about it, take a look here:

    http://www.forum.nokia.com/info/sw.n..._0_en.zip.html

    Pit

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    2

    Re: How to save a drawing in png or jpg format ?

    Hi jappit,

    Thnx for the reply.
    Actually I want to know the ways to convert raw data of image object into png or jpg format.
    I hv no prob in sending or storing the data but the problem is arising in the format conversion.

    I hope, now u can better understand the problem...
    Thnnx.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: How to save a drawing in png or jpg format ?

    Hi,

    if raw image data is the only format you can get for your signature, then you could try working with Image createRGBImage() static method, that takes a sequence of ARGB values as argument, and returns an Image instance.

    About the format conversion, there's no such support in Java ME, so you should rely on external libraries, like these:

    * for BMP format: http://javablog.co.uk/2007/12/26/j2me-bitmap-encoder/
    * for PNG: http://www.chrfr.de/software/midp_png.html

    If you want to save those images on a server, you could also think about converting them directly on the server side.

    Hope I've understood your problem

    Pit

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    15

    Re: How to save a drawing in png or jpg format ?

    To save images in png or other format in filesystem, you need to write or use an Encoder. check this link (http://www.chrfr.de/software/midp_png.html) for a minimal png encoder and further links i n it for similar encoders.

    Enjoy...

Similar Threads

  1. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  2. what format to save mp3 file?
    By zwgoal in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2005-11-13, 10:57
  3. using jpg instead of png???
    By farhanx in forum Mobile Java Media (Graphics & Sounds)
    Replies: 13
    Last Post: 2003-10-15, 02:38
  4. Converting bitmap to jpeg or gif or png format.
    By hhemant in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-08-20, 07:55
  5. About the JPG and BMP format image.
    By kangtk in forum Symbian
    Replies: 1
    Last Post: 2003-02-10, 10:44

Posting Permissions

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