Results 1 to 9 of 9
  1. #1
    gaurav17may is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Post scanned image save by swing dialog box

    hiiiii,
    Anyone can tell me...I write a swing program to capture images through camera and scanners which is display in image area but i m not able to save that image through a save dialog box.What should i do?????

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default

    What's a "save dialog box"? If you're referring to JFileChooser, what in the API for that class makes you think it will automatically save content to a File?

    Hint: read the API for ImageIO

    Also recommended reading:
    How To Ask Questions The Smart Way

    db

  3. #3
    gaurav17may is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default reply

    I just want to know how could i save a scanned or camera image by Jfilechooser(savedialogbox) program,how should i use that camera image object to save that image at desktop...

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default

    There is confusion in your question.
    Is the image a file somewhere on your PC? What is a "camera image object"?

    You use the JFileChooser to select any file(s) on your PC so you can get the path to those files. It doesn't do any processing on the file, it only supplies the path to the file.

  5. #5
    gaurav17may is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default thanks for ur support

    I capture a image from camera in Imagearea then i want to save this image on my disk drive or desktop...but how could i

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default

    capture a image from camera in Imagearea
    What/where is Imagearea? Please explain.

  7. #7
    gaurav17may is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default request

    actually i write class imagearea which extends JPanel then i create a object of imagearea class and capture image in JPanel,picture got capture but i m not able to save it on desktop(or any location )into proper format...

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default

    If you have an image in an Image object, look at the ImageIO class for methods to write it as a file.

  9. #9
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default

    For the scanning and taking pictures I think you need to read the manufacture's API. (if that was what you wanted)

Similar Threads

  1. How to open a SAVE file dialog box without using SWING or AWT
    By SAYAN in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 02-25-2010, 01:30 AM
  2. save dialog problem
    By masa in forum AWT / Swing
    Replies: 2
    Last Post: 03-06-2009, 12:41 AM
  3. Dialog Image
    By crystalClear in forum AWT / Swing
    Replies: 13
    Last Post: 02-25-2009, 06:38 AM
  4. File dialog with save
    By manpreet in forum New To Java
    Replies: 1
    Last Post: 01-02-2009, 05:44 PM
  5. Replies: 0
    Last Post: 12-06-2007, 06:10 PM

Posting Permissions

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