How to save an image to *.gif or jpg?

Hello All,
I'm stumbling upon another problem. I can save my displays as *.jpg file but it's very blurry, is there a better way to do this? My code as below:
try
OutputStream out = new FileOutputStream(new File("./outfile.jpg"));
Image image = this.createImage(this.getWidth(),this.getHeight());
Graphics g = image.getGraphics();
this.paint(g);
ImageIO.write((RenderedImage)image, "jpg", out);     
out.flush();
out.close();
}catch(Exception ee) {}
Any suggestion is greatly appreciative. Thanks in advance!

Try looking at "Encoder" in the search - that should fix you up matey

Similar Messages

  • How to save the image in the form?

    As thread, how to save the image into a file from the pdf form - image box?
    I have Adobe Acrobat 9 Pro extended.

    Hi Sandy,
    Sorry for Delay.Could you please provide script code for the Button and in which event we want to add the code
    I want to Save the lot of images in the PDF. For that I kept Image field in the form.Here I am able to upload the images but those are not saved.
    If possible please share the details document.
    Please help me.
    Thanks,
    Ravi.

  • How to save an image as a PICT resource file?

    Can someone tell me how to save an image as a PICT resource file? I'd like to make ikons in Photoshop and save them in this format, but I 'm not finding any leads. Thanks!

    If you have Resorcerer from "ancient times" it of course can handle resource forks since that's was it's goal in life.
    There are lots of icon creation apps these days.  Do a search for "icon" on macupdate.com to see what's available.  For example that search finds:
    iconXprit
    Icon Builder X

  • How to save an image to database and retreive from it.

    how to save an image retreived from an bytearray to database and retreive back the image from database....pls specify the steps and the query.

    You can use the JDBC API for database connectivity and you can use SQL to query the database.
    JDBC tutorial: http://www.google.com/search?q=jdbc+tutorial+site:sun.com
    SQL tutorial: http://www.google.com/search?q=sql+tutorial+site:w3schools.com

  • How to save an image as PDF?

    Hi,
    I need help o how to save an Image as PDF file?? is this possible?

    Under Getting Started in the welcome window click Create PDF
    Open your image
    File>Save As...PDF
    But I am finding that there are limitations on how big the image can be. I am trying to save a 20mb jpeg to pdf in acrobat and having issues. Good luck!

  • How combine a jpeg image & animated gif image & save  it as GIF ?

    i have an jpeg image, & also aminated gif image, how do i place the animated gif image over (in the center of the image) a jpeg image & save it as gif file ??

    First thing you need to do is stop thinking in terms of file formats once the files are in photoshop they are all the same. The exception being vector vs raster. But in this instance the process is rteally the same so 6 on one hand a half a dozen on the other. Or as some would say Tomatoe, tomahtoe(mispelled on purpose).
    The jpeg I would assume is the background image and the gif image is the fore ground object. Open the jpeg, and then place the gif file. As long as the fore ground object has transparency, your job is pretty much done. If not, then it will be up to you to mask what you want to keep vs what you don't and apply that selection to the foregrounds layer as a mask.
    Google the net or skim the users manual for the keywords - mask, selections, quickmask, pen tool, paths. Each of these can in one way or another take care of your issue.
    It would be worth your time to also go through the numerous videos about photoshop and see how its done.
    Either go to adobe tv,
    Itunes podcasts
    or one of the following web sites:
    http://kelbytv.com/
    http://creativesuitepodcast.com/

  • How to save an image withe hyperlinks (NL)

    Can someone tell me how i add hyperlinks to a part of my image. I created segments, but when i wan to save it for the web, the image saves itself in many gifs files. Can someone help me

    It works this way because the web works this way. Images themselves cannot hold interactive data. It's all in the HTML and CSS code.
    Mylenium

  • How to save an image in different format

    i want to save an image in different format (as .jpg ,.gif, .tiff, .png, .bmp) using save dialog box , where format should come in drop box menu "Save as type" in save dialoge box.what to do.???????plz any one suggest me .........

    alok_raj wrote:
    i want to save an image in different format (as .jpg ,.gif, .tiff, .png, .bmp) using save dialog box , where format should come in drop box menu "Save as type" in save dialoge box.what to do.???????plz any one suggest me .........1) Spell words properly. That word is 'please'.
    2) Fix your sticky keyboard for the '?' and '.' keys. Only one of those characters is generally needed to denote a question or the end of a sentence. Two or more often denotes a dweeb.
    I might come back to your question later, assuming I can actually bare looking at that mess long enough to figure out what you want.

  • How to save an image from canvas to jpeg2000 format?

    good day! i would like some help about jj2000. i wish to save an image from canvas to a jpeg2000 format file. how will i do it using the jj2000? i just need to save it to a file.
    please help!!!
    thank you in advance!
    lrds

    I am not familiar with Jpeg2000, but the easiest way I've found to go from Java to a JPeg file is with Java Adavanced Imaging (JAI) package from Sun. Take a look at it and see if it meets your requirements.

  • How to save iPhoto images on disc

    Trying to save space on My HD, can't figure out how to save an album to a disc

    after having used iPhoto 08 for a long time the link between the program and the source files broke. i have a hard time restoring the library. how can i import ALL images on my harddisc into iphoto? is there a function that scans and finds all images automatically?
    You really would not want to do this - you would have a mess - many duplicates and lots of images that have nothing to do with photos
    Tell us more about your problem - what is happening and how it occurred
    Most likely you have all of your original Photos in the originals folder of your iPhoto library and simply quitting iPhoto, dragging the iPhoto library to the desktop, launching iPhoto and creating a new library and dragging each folder from the originals folder in your iPhoto library on the desktop onto the iPhoto icon in the dock (check to be sure that the iPhoto preference to split items imported from the finder is NOT checked) - this will recreate your events
    If this is not an option their probably is still help
    LN

  • How to save layer image

    Hi, I'm a newbe
    I need to save the image of a layer, but my asset is a psd file, how do I get the image from it?
    Thx

    hi nnzz! welcome to the forum!
    a layer's image pixels are gotten in the same way regardless of the source.
    if your effect is applied to it, you'll have the pixels handed to you from AE automatically.
    in any case you can get the layer's source item and render it through the render suite.
    once you have the pixel datayou can process it and save it in any way you like.

  • How to save inline images and attachments separatley?

    Hi,
    I want to save all inline images into a certain directory and all attachments into another directory.
    I use the following code to do this:
      Multipart multipart = (Multipart) message.getContent();
            for (int x = 0; x < multipart.getCount(); x++) {
                BodyPart bodyPart = multipart.getBodyPart(x);
                String disposition = bodyPart.getDisposition();
                if(disposition != null){
                     log.debug("Disposition: " + disposition);
                     if (disposition.equals(BodyPart.ATTACHMENT)) {
                          log.debug("Mail has attachment: ");
                         DataHandler handler = bodyPart.getDataHandler();
                         log.debug("FILENAME: " + handler.getName());                    
                         saveAttachment(session, bodyPart, emailData);
                     else if(disposition.equals(BodyPart.INLINE)){
                          log.debug("Mail has inline attachment: ");
                         DataHandler handler = bodyPart.getDataHandler();
                         log.debug("Inline FILENAME: " + handler.getName());
                         saveInlineAttachment(session, bodyPart, emailData);
                else {
                     log.debug(bodyPart.getContent());
            }This approach works when the email has inline images only or attachments only.
    It does not work when the email has both inline images and attachments. (Only the attachments are saved).
    Come someone please help me correct my solution so that it can process an email that has both inline images and attachments and save them in different directories.
    Thank you

    Thanks bshannon.
    It took me a while to understand what you meant but I think I finally got it.
    I modified the getText method in order to save the embedded images:
    private Image getImages(Part p, EmailData emailData, String ext) throws MessagingException, IOException {
             if (p.isMimeType("image/*")) {
                InputStream is = p.getInputStream();         
                BufferedImage im = ImageIO.read(is);
                String fileName = "attachments/inline/body " + inlineImageNumber++ + "." + ext;
                File imageFile = new File(fileName);
                ImageIO.write(im,ext,imageFile);
                is.close();
                emailData.getInlineAttachments().add(fileName);
                return null;
            if (p.isMimeType("multipart/related")) {
                Multipart mp = (Multipart)p.getContent();
                Image image = null;
                for (int i = 0; i < mp.getCount(); i++) {
                    Part bp = mp.getBodyPart(i);
                    if (bp.isMimeType("image/jpeg")) {
                        if (image == null){
                            image = getImages(bp, emailData, "jpg");
                        continue;
                    else if (bp.isMimeType("image/gif")) {
                        if (image == null){
                            image = getImages(bp, emailData, "gif");
                        continue;
                    else if (bp.isMimeType("image/bmp")) {
                        if (image == null){
                            image = getImages(bp, emailData, "bmp");
                        continue;
                    else if (bp.isMimeType("image/png")) {
                        if (image == null){
                            image = getImages(bp, emailData, "png");
                        continue;
                return image;
            else if (p.isMimeType("multipart/*")) {
                Multipart mp = (Multipart)p.getContent();
                for (int i = 0; i < mp.getCount(); i++) {
                    Image image = getImages(mp.getBodyPart(i), emailData, "");
                    if (image != null){
                        return image;
            return null;
        }

  • PSE 7 Windows 7, 1.5 TB disk, how to save the image

    I got a new PC with a 1.5 TB hard disk, running Windows 7 and PSE 7. With the help of this Forum I managed (changing the scratch disk with  ALT and CONTROL) to start and work with PSE 7.
    However, now I am unable to save the image, again the error message is: Scatch disk full.
    Any ideas how to solve the problem? 

    If you have a spare volume, allocate that as the scratch disk first, followed by the C drive as the second scratch disk.
    Sometimes you run short of RAM if you have lots of open images. Try saving and closing as you work.

  • How to save inline images

    Hi,
    Using java mail api.
    Not able to save those images which are embedded as part of a mail message body.
    It has no filename.
    How can it be stored and showed as part of web-application whichreplicates the microsoft outlook.

    Thank you for your reply.
    But I hav few questions here.
    How do I translate cid references and save?
    I get cid reference name with getHeader("Content-ID");
    But this gives me String.Just a name.
    How do I save this?
    ***Is this the way it is or any othe way is there.***
    Plz Plz PLz help me.
    Its a very big big issue for me.
    It would be helpful If anybody can help witha bit of coding example.

  • How to save multiple images from jpeg to psd?

    I'm pretty new at this and have tons of vacation photos. Things I've read have left me terrified of leaving my images in jpeg, but I don't know how to save them all to .psd (and is that really the format I want to use?). I tried, and suddenly I'm out of space on my harddrive, so I think I've made copies of copies and have way more saved than I need. Any advice is appreciated - thanks.

    <[email protected]> wrote<br />> ...Things I've read have left me terrified of leaving my images in jpeg...<br /><br />Andrea,<br /><br />If the JPEG files are straight out of your camera, there is no harm in <br />"leaving" them as-is...  they don't degrade from just sitting there.<br /><br />The possible degradation of JPEG files comes from saving as a JPEG - <br />typically after you have done an edit to the image.<br /><br />One good way to approach the issue:  when you open an image for editing, <br />before you do anything, click the menu File > Save As...  and then choose <br />the PSD file type.  This will make a copy for you to work with, which will <br />NOT degrade as you save, re-edit, re-save, etc.  After you're finished <br />working it over, if you need a JPEG copy, use the File > Save As...  and <br />select JPEG to make an edited copy in the smaller file format.  (File > Save <br />For Web is also useful for this - it allows you to set your quality and size <br />parameters on-the-fly as you save)<br /><br />HTH,<br /><br />Byron

Maybe you are looking for

  • How to delete record from table control using BDC?

    Hello friends, I am running a BDC program to delete records. I have file with following records and i got these records into t_itab. Material     Plant     Start date     End date     Cost MQ100001     S001     09/01/2008     09/31/2008     55.00 MQ1

  • Need Help XML Publisher Report

    Hi Friends I need to generate a report in xml publisher responsibility . I have create and designed the RTF file using word , And i have genetared an XML file(template ) I have some doubt please clarify by doubts In RTF template i have some 4columns

  • Dynamic connection to eBusines Suite

    Hi All, Is it possible to decide eBuiness Suite to be connected at runtime of a BPEL process? Our Requirement: We are creating an application that integrates with different (around 15) ebusiness Suites. We have same procedures compiled in all eBusine

  • Failed to Reload 4.5 Operating System

    Hello, I wiped out my blackberry curve 8310 and am having a problem to reload the OS. It show a white screen with an error 507. Whenever I use the application loader it brings this message:-  The blackberry desktop software does not have Blackberry D

  • Moving Through Messages

    Is there a way to move from one open message to another without closing each message I open? Here's my layout: Mail list has preview turned off Down & up arrow through list of messages Hit Enter key to open first message - window with message appears