Saving Image Files on Disk after drawing lines on the Image

Hi guys,
I am presently working on a swing project in which I need to draw lines on a image and then store the modified image in .gif, .jpg or .bmp file format.
I can't seem to find an documentation dealing with this situation.
Any help will be highly appreciated
Abhi

Ive just been looking for the same. Theres an article (and a class) on javaworld on subject of saving bitmap-files, and in another thread in this forum, a guy described how to make jpg. with the jdk1.4 .... Like this:
int w = comp.getWidth();
int h = comp.getHeight();
BufferedImage im = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = im.createGraphics();
comp.paint(g2);
g2.dispose();
ImageIO.write(im, "jpeg", new File("foo.jpeg"));
im.flush();
Im just referring, havent tried it yet. Good luck.
Stig.

Similar Messages

  • I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    Hi jgallu7382,
    The latter is easily accomplished using the Drawing Markup tools, which are available in both the free Adobe Reader, and in Acrobat. Copying/pasting text into the PDF is something that you could do using the editing tools that are available only in Acrobat. Note, however, that Acrobat isn't intended to be a text-editing application, so editing there won't be as robust as in an application designed specifically for that purpose. (It's also worth mentioning that you won't be able to alter a PDF if it has document permissions applied that would prevent you from doing so.)
    I hope that answers your questions.
    Best,
    Sara

  • I scanned an old image using my Epson NX515 printer, used GIMP to make some minor repairs on the image and printed it out.  I noticed there were a number of evenly spaced thin blue lines across the image, approximately six of them.

    I scanned an old image using my Epson NX515 printer, used GIMP to make some minor repairs on the image and printed it out.  I noticed there were a number of evenly spaced thin blue lines across the image, approximately six of them. I opened & printed the image on my PC using PAINT.NET.  No lines appeared. I sent the image to my daughter. She printed it and found no lines. I printed the image using Seahorse on my Mac and the lines still appeared. I used basically the same print settings on Mac and PC.

    maahes wrote:
    did so now, only now I'm getting a slightly different error: could not find udevd no such file or directory. I checked both grub.cfg's and my mkinitcpio.conf and there's no listing for udevd ....which I've never heard of, so I assumed it was a typo?
    For clarification: udev is in the mkinitcpio.
    I'm not sure whether I yet have a good intuition for how you have your machine set up, but I suspect you need to include a cryptdevice flag to the kernel in your grub config. The file isn't found because the kernel doesn't know your root directory needs decrypting first.
    My setup is an LVM over LUKS over LVM sandwich. To boot into my system, the grub.cfg contains the line:
    linux /vmlinuz-linux root=/dev/mapper/cryptvg-root cryptdevice=/dev/mapper/vg-crypt:root rootfstype=ext4 pcie_aspm=force acpi_osi=Linux acpi_backlight=vendor i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 ro
    Now, most of those flags don't have anything to do with your problem, but note the cryptdevice. It tells the kernel it's dealing with an encrypted filesystem sitting in a logical volume called crypt on a volume group called vg. The bit after the colon tells the kernel to associate this encrypted filesystem with /dev/mapper/root.
    As for how to fix your system, I'm afraid I still feel a bit fuzzy about how your LVM and encrypted layers relate to each other, whether you have LVM over LUKS, or LUKS over LVM, or something else. Was there a particular how-to that you followed?

  • I can't get imovie to open after trying to shift the image to my TV by clicking fn F3.  If I hold the mouse on the imovie icon for a few seconds the imovie window opens but if I click anywhere on the window it disappears

    I can't get imovie to open after trying to shift the image from my macbook pro to the tv screen like I have done many times before.  If I double click on the imovie icon, imovie doesn't open, but the strip across the top shows iMovie, file, edit , clip, view, text share window help tabs across the top.  The iMovie window will appear if I click on the iMovie icon on the dock for a few seconds, or if I do control F3 at the same time, but when I click on the window it disappears.  When I hover the mouse over the iMovie window that appears the window has a blue border around it.  when I move the mouse outside the iMovie window the blue border goes away.  If I sweep 4 fingers from the top of the screen down, the screen dims a little but the iMovie window doesn't appear. If I click play under the view tab I can hear audio, but still no iMovie window.  It's as if the window is being blocked by the desk top somehow.

    Similar issues here.
    I purchased five movies for download and having nothing but problems getting them downloaded. I keep receiving error messages and the download stops and I have to restart it, just to get another minute worth of download with each restart. Now Apple has my money and I have nothing.

  • How to extract the lines from the image

    Hi Everyone,
    I have an Image. In that, a circle object (plastic material) placed at centre with dark background. When the light is allowed to propagate through the plasic ring, It is getting disturbed by the cut made in that. When light allowed to pass through, we can see some lines (via camera) in the plastic ring. Now I need to count the number of lines in the plastic ring programatically using Vision. How to start this ??? I m new here, so please treat me like a baby...
    Find the sample Image below.
    I am using NI Vision assistant & Labview 8.2.1.
    Thanks in Advance
    Attachments:
    DSC_3017.JPG ‏165 KB

    I followed the same procedure in Labview 8.2 and it doesnt work (Returns an error: Invalid ROI). Then I started the same programming in 2013 and its working good. I really dont know why ?????!!!!!!!!
    Now the problem is different. After thresholding the image, it stays with some noise. I need to eliminate all and count the number of lines in the image. How to do that ???
    Here I dont see any function like Threshold Detector like what BruceAmmons said.''
    Refer the modified VI attached below.
    Attachments:
    IMAQ_lines_Modified.vi ‏51 KB

  • Good day! When saving a file in Illustrator, I can not keep the older version. How You can save the file in an older version?

    Good day! When saving a file in Illustrator, I can not keep the older version. How You can save the file in an older version?

    When you save a file that's what options offers application
    05 мая 2014 г., в 13:40, Jacob Bugge <[email protected]> написал(а):
    sage go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click theStop Email Notifications link.

  • How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?

    How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?
    When I drag the item off of the trifold that I am creating, it just disappears but I still want to use it.  I just need to move it out of the way to modify other portions of the document.
    thanks,
    C

    Add another page below the current one to use as a storage area. You can't use the grey area around the page for storing items you want to use later.
    Go to the Pages Menu>Provide Pages Feedback if you would like to request this feature be added in future versions.

  • When editing an image in Photoshop from Lightroom then saving it back to Lightroom, how do i get the image to go back and  sit next to the original? Mine is going to the end of the folder. Thanks Karen

    When editing an image in Photoshop from Lightroom then saving it back to Lightroom, how do i get the image to go back and sit next to the original image? Mine is going back to the end of the folder. Thanks Karen

    Hi Karen
    You may the sort set to Custom. Click the dropdown menu on the toolbar (to the right of the word sort) and change to capture time.
    If you can’t see the toolbar above the filmstrip press the T key. Press T again to hide.

  • When I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    when I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    Make sure that '''''Print to File''''' isn't selected in the native print dialog box ''(see screenshot below)'' middle-right, and make sure your Printer is selected at the top of that dialog box.
    ''I'm a little confused why an email attachment would need to go directly to the printer, but that's what you asked about.''

  • I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    Unfortunately no - Photos use extensions and the vendor (adobe) will have to implement the extension to allow external edits in PS or PSE
    For now you must export the photo, edit and then import - not great but a work arond
    And you can continue to use iPhoto until Photos meets your needs - launch it in your applications folder - if you need assistance on this see Why won't my iPhotos open?
    LN

  • I have my camera (Canon 5D MARK 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put ab

    I have my camera (Canon 5D Mark 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put about 700 images in an untitled project folder, but all the images are the JPEGs.  What am I missing?
    Thanks,
    upsjdris

    Have you checked your "Import" settings for "Raw&Jpeg" pairs in the "Import" panel?
    You can set Aperture to import raw, jpeg, or raw&jpeg.
    If you imported Raw&Jpeg, but have set Aperture to use the Jpeg as original, you will see the imported image as Jpeg image, not as a raw image, even if the raw has also been imported. You can switch between Raw and Jpeg originals for selected images from the Photos menu:
    Photos > Use Raw as original.
    Regards
    Léonie

  • Remove the dotted line in the image map

    dear all, i would want to know how to remove the dotted line
    of the image map, for my case, i cannot see the dotted line in IE
    but can see the line in firefox, (in my boss computer, he can see
    the dotted line in both IE and firefox)
    i have try some method such as using the component of
    Remove
    IE Link Scrubber by PVII. while i find it is not work. could
    any one give some suggestion for me to remove the dotted link of
    the image map or give me some ways that other than using map.
    thx a lot !!!!!!!!

    i have find a way to solve the problem of the dotted line in
    the image map
    e.g. <map name="123" >
    <area style="cursor: hand" shape="circle"
    coords="223,261,76"
    onClick="checkit('m_strategic/m_strategic.cfm')"></map>
    the checkit() method is just to redirect the page into other
    page only.
    however another problem is face, the cursor will not change
    to hand when i point to the image map, i have try adding
    onMouseMove="this.style.cursor=hand" on the <area> tag
    however it don;t work, it only work when i put into the <img>
    tag. can any one tell me how to change the mouse cursor in this
    situtation??
    thx a lot

  • Have placed video-when previewed there are sometimes heavy black lines around the image. If I place white rectangles in front, the black is hidden in Author, but when I preview the black lines are still there..How to use white rectangles to mask edges?

    I have placed video - when previewed there are sometimes heavy black lines around the image.
    If I place white rectangles in front, the black is hidden in Author, but when I preview the black lines are still there..
    How to use white rectangles to mask edges?

    Here's view in IBA you can see bounding boxes of white rectangles that
    form frame to block out black setions..
    Here's iBook preview image of same page, NO WHITE FRAME!
    WHY?
    BOB SPRAGUE

  • I Have a Mac 10.2 and a HP 6700 all-in-one printer,when I set-up to print the top line of the image is cut off

    I Have a Mac 10.2 and a HP 6700 all-in-one printer,when I set-up to print the top line of the image is cut off

    If there isn't a Page Setup in the Print Dialog, open Text Edit>Edit>Page Setup, check borders there or use Custom Page setup & save.

  • Error encountered while reading TIFF image, Image may be damaged of incompatible. Resave the image w

    I am currently running CS3, windows XP, service pack 2, with recent update, 5.03 installed today.
    I just opened a 500 page document not in sections where 90% of the document is a placed PDF.
    The PDFS were placed using a sample Script that came with Indesign, that instructs the PDF to automatically flow each page after another.
    When scrolling through quickly in the pages pallette, I get the follwing error:-
    "Error encountered while reading TIFF image, Image may be damaged of incompatible. Resave the image with different settings and try again."
    I click OK.
    Then I get the following error.....
    " Could not complete request because of database error. The File "ABC.indd" is damaged (Error Code: 3).
    Click OK....
    Then I get the following error....
    Adobe Indesign is shutting down. A serious error was detected. Please restart Indesign to recover work in any unsaved Indesign documents.
    Then I get the error.......
    Indesign.exe has encountered a problem and needs to close. We are sorry for any inconveneince.
    And I have two buttons to click....
    Debug or Close.....
    If I click Debug, it closes Indesign.
    Within this window there is also a window to gather further information....I click it and it tells me...
    "Indesign.exe....Error Signature AppName: indesign.exe AppVer: 5.0.3.662
    ModName: public.dll ModVer: 5.0.3.662 Offset: 0002e19a"
    To view technical inforamtion about the error report, clikc here....
    "Then it creates an error report and tells me where the report is located along with a scrollable window of 0xc0000005 and heap of zeros."
    The report conatains a whole heap of CHECKSUM ERRORS.
    CAN ANYONE PLEASE HELP??
    I had these errors before updating to 5.03 and the patch hasn't rectified anything!!

    Open the .inx file in CS3 (that's what you have, right?) and save as a new .indd.
    I'd also be tempted to open the tiff in Photoshop and do a save as to re-write it.
    Let us know if it helps.
    Storing files on the network leaves you more open tot he risk of file damage during transfer and save operations.
    Peter

Maybe you are looking for