Problem in saving a grafic as a jpeg,the grafic is drawed on a jpanel!

I can't save a grafic as a jpeg!
When i save the jpanel content i get a blank picture!
Can someone give an example ?
Thanks in advance!
Message was edited by:
kynamar

private void save_jpg()
//pScale  - method that draw's the grafic on the jpanel
pScale(datanal(tabel.getRowCount(),col_1,coloane_selectate.get(coloanele.nextElement())),pane);
BufferedImage myImage = new BufferedImage(pane.getWidth(),pane.getHeight(),BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = myImage.createGraphics();
pane.paint(g2);
     try {
         OutputStream out = new FileOutputStream("1grafic.jpg");
         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param =encoder.getDefaultJPEGEncodeParam(myImage);
          //the first parameter here is the "quality v file size" trade-off
          //play with this value (0-1) to determine the best results for you
          param.setQuality(0.9f, true);
          encoder.encode(myImage, param);
          out.flush();
          out.close();
       } catch (Exception ec) {
         System.out.println(ec);
       }

Similar Messages

  • Saving raw file as a jpeg

    I recently got a new computer and loaded photosop CS2 and elements4 on it. Unlike my old computer the raw plug in opens in elements it used to open in CS2. This in itself is not a problem however I dont seem to have the option of saving a file as a jpeg as I used to. All it will save it as is a DNG which is useless for what i need. It used to be so simple before. Would appreciate any help or advice but please dont make it too technical as I really am a computer numpty.

    Just a shot in the dark, as I don't use either Windows or Elements:
    ACR is crippled in Elementsin more ways than one. Try clicking on the Open button, rather than Save, then save in Elements as a JPEG.
    You can (and should) change your File Type Associations in Windows so that ACR is hosted by Photoshop instead of Elements.

  • How do I accomplish saving a panoramic photo in JPEG?

    I recently purchased Adobe Photoshop Elements 9 and subsequently installed the software on my Mac.  I took seven images and merged them into a panoramic photo.  I wanted to save the panoramic photo into JPEG format and then store the photo in Adobe Elements 9 Organizer for use as an attachment in an email message.  I was able to save the panoramic photo in JPEG, but could not accomplish storing it in Adobe elements 9 Organizer.  Additionally, in the photo I did save in JPEG, the image was not independent of the Adobe Photoshop Elements 9 software.  In other words, when opened, it appeared in the project bin.  Does anyone know what I was doiing wrong?  Was the panoramic photo image too large?

    Any opened photo is in the project bin, so I'm not sure what you see as a problem there. As for the organizer, I'm guessing the problem is that you had to save as a copy to get rid of the layers? If you don't want to do this, merge the layers before saving. Note that you'll lose them permanently if you do this, but it's up to you--have to reimport the jpeg as a new image or else trade layers for convenience.

  • I cannot export my saved book to pdf or jpeg or blurb

    i cannot export my saved book to pdf or jpeg or blurb. Nothing works. If i start a new book , then it works but i would have to redo the entire layout.
    Anyone have the same problem or/and anyone could help?
    Thank you

    Yes i do use LR4.3 .Idid upgrade to L4 from L3 , only because the book feature,to switch from blurb to PDF. I do use mostly my own images or combination of photo montage, but sometimes color backgrounds or lightroom graphics.
    I just reinstalled all my backgrounds and it seems like to work now.No explaination of what went wron (or what is wrong) as i am used to lightroom .May the fact that i am tweeking the layout (using the print layout) or the padding feature quite a bit but that's what the software is supposed to do.

  • Problem with saving a pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21).

    Need advice on a saving file issue. I'm having problem with saving a .pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21). This is new as this error message just recently started to pop-up.

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Problem while saving date field in custom table

    Hi,
    Iam facing the following problem while saving a date field in custome table
    i have a date field zdate in which the value is 02082010.
    now when i try to insert this value in the custom table it is getting updated as 20/10/0208 , but it should be 08/02/2010
    How can i correct it..
    Regards
    Kumar

    just before saving u might have to use a string reverse FM and then save it..
    CALL FUNCTION 'STRING_REVERSE'
      EXPORTING
        STRING          = p_string
        LANG            = sy-langu
    IMPORTING
       RSTRING          = r_string
    EXCEPTIONS
       TOO_SMALL        = 1
       OTHERS           = 2

  • Problem when saving form in web dynpro abap application in se80

    Hi,
    I am trying to develop an adobe application. When I save the form which i have designed.
    I get the "error" unable to convert data and the transaction is terminated.
    I dont have any idea why.
    Help
    Thanks,
    Harish

    Hi
    Are you getting the problem  while saving the Adobe form  or while saving the webdynpro application.
    Could you please elaborate your problem.
    Regards
    Naresh

  • Problems with saving edited photos using Photoshop Elements 5.0 on WIndows 8.

    Since a week I can not save the edited photos - when I try the communicate: "Caould not complete your request because of a program error" appeares. I had no problem with saving edited photos before, with the same software. My computer runs on Windows 8, 64 bit version. My Photoshop Elements is version 5.0. Where is the problem?

    W dniu 2013-06-16 15:36, dj_paige pisze:
    >
    Yes, I did it long ago.

  • Problem with saving filled-in form

    I downloaded an official state form and after filling out the required fields saved it.  When I retrieved the document, the filled in data appeared for an instant then disappeared.  I have previously downloaded forms from this State site and filled in the fields, saved the document and then retrieved it without a problem.  Now whenever I pull up a document.pdf the once filled-in fields vanish.
    I have not changed any settings on the Adobe Acrobat 8.0 Professional application that is being used to save and then retieve the document.  I am using XP Professional with SP2 and all other updates.
    Can anyone explain why the filled in form does not stay filled in when retrieved and how to fix it so it will not happen again?

    The form may be set to clear the fields when opening. There are various reasons folks select this option, but it is likely the problem.

  • I created a publisher file, saved it as a pdf. The problem is I created it landscape and it only shows portrait cutting the sides off my document.

    I created a publisher file, saved it as a pdf. The problem is I created it landscape and it only shows portrait cutting the sides off my document.

    Sounds as if you used Microsoft software to make a PDF. If so, and you didn't use Adobe Acrobat ($$), then you need to get help with Publisher -- Adobe Reader only shows what you make.

  • Colour profiles problem - images saving too dull. Please help.

    I realise you have probably had this question a million times before and I have looked at enough related threads, but I am still at a loss as to what to do. Please note I'm not the most computer-savvy.
    For the record I am using Photoshop 7 (yes it's old, but it suits my needs just fine!) and Windows Vista Home Premium.
    What I do is take photographs of my artworks, edit them in Photoshop until they look accurate, then post them online. Images have always looked identical in every program, and I had never had any problems, until I got connected to the Internet on Tuesday. This computer has not been connected to the net for a good few years, and so lots of updates got installed. I'm not sure which ones exactly, as my boyfriend took care of that, but I'm convinced this has caused the problems I am having now:
    First I found that an image I had edited and saved as .jpg for web use was showing up overly saturated and contrasty in the Windows Photo Gallery preview. I assumed I had saved it wrongly. I re-opened the jpg in Photoshop to check - it looked exactly as I had saved it. I figured something had messed up with Photo Gallery during updates, so I uploaded the jpg to the Internet. The image that uploaded was the overly-saturated, contrasty one.
    After realising that suddenly ALL the images I had uploaded online, and all the images saved on my computer, now had this awful over-saturated look, and yet the thumbnails on my desktop looked fine... I realised it must be something to do with the colour profiles, and tried to find out the answer online. My monitor colour profile was set to "21.5 inch monitor" so I changed that to sRGB as default. I can't remember what Photoshop was set to, but at any rate I set it to sRGB also.
    I thought I had it fixed, as it seemed to just be Photo Gallery that was not matching up (it was displaying my images with less saturation than as I saved them).
    However today I took a new photo of a drawing I'm working on, to load onto my blog. I had to take it into Photoshop to make edits and correct, as always. I opened my photo in Photoshop... lo and behold, far too contrasty and saturated!!
    This time, Windows Photo Gallery preview is showing the (unedited, straight out of camera) photo as it should be... Photoshop opens it too contrasty.
    I made my edits anyway, saved for web as .jpg, checked the jpg in Photo Gallery before uploading... It saved duller than it should have done!
    Uploaded the jpg to the internet... and I have the dull image uploaded.
    So first they were too contrasty, now they're too dull. I have tried to follow advice given on similar topics, to no apparent avail.
    Being an artist who displays work online and has a certain reliance on the internet... my images have to be accurate and consistent all the way through. Is there anything I can do to set things back to the way they were before?
    I appreciate any help.

    eartho - All my images are already converted to the sRGB colourspace by default, as far as I can tell. My images out of camera, the ones I have edited and saved as jpg - I even checked some old images. Through Mode/Convert to Profile, they're all already set to sRGB.
    emil emil - Thank you. I will do that in the morning - right now my head hurts and I need my bed.

  • Problem in saving tiff from PS

    I am using LR 4.1, and PS6 with ACR 7.1, although I have this same issue PS 5.1 and ACR 6.7.  I select "edit in Photoshop", and when finished save as a tiff (same problem with PSD) in the same folder where the raw file (in my case CR2) is.  The saved tiff looks far different from the way it looked in PS.  Typically it is much lighter.  In fact, I can select "edit in Photoshop", do nothing in PS, save as a tiff the same thing occurs.  If I save the tiff to another folder, there is no change.  So, it appears LR is modifying the tiff image in some way when saving.  This is with Windows 7 and ProPhoto RGB in both LR and PS.  Any help would be greatly appreciated.
    Ken Carney

    Make sure that in Photoshop you have your color settings right.
    In PS go >Edit >Color Settings and select  "Pro Photo RGB" as working space under RGB.
    Then under >View make sure that "Proof Colors" is unchecked.

  • Problem in saving values to DB

    Hi,
    i'm a new bie to BSP. Currently i'm facing some problems in saving the values to DB
    I'm assigning value for a html hidden field in VBScript, how do i save the same in the SAP database.
    Thnx in Advance
    Vinodh

    Hello, welcome!
    Second please check out this weblog:
    <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">BSP Trouble Shooting: Getting Help</a>
    Third, check out in transaction SE80 the BSP Application SBSPEXT_HTMLB and look at the one for inputField.
    Then I would highly recommend checking out this weblog series: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/exploring%20bsp%20development%20and%20the%20miniwas.htm
    It's a complete tutorial including saving to the DB.

  • Problem in saving the workbook as favourite

    Hi,
    I have a issue around saving the BEx reports as favourites.
    One of our user is not able to save his report in his favourites folder. He was able to do the same before,but now he can't do it anymore.He gets a pop up error message'WDTTREE - type mismatch' type....This is a problem with only few users and not all of them.
    I know we can set the object changeability in RSA1 but that should affect all or none of the users as it is set globally.So,is it possible that I can check it somewhere if that user does have the authorisation for saving the reports as his favourite. There is no direct authorisation problem with his userid as I have checked the SU53 dump also with his logon.
    rgrds
    Umesh
    Message was edited by:
            Umesh  Mehra

    Hi Shabar,
       Am on 3.5 and this note points to 3.0,I guess. Also,as I mentioned,it's a problem with only one user and not with all the users. Rest of the users are ok their favourites.
    rgrds
    Umesh

  • Problem in saving ztable from va01 screen through exit

    Hi all,
    I am facing problem while saving ztable through additional data b tab screen of va01.
    Actually I have add table control in tab and on the basis of vbeln i am saving table control data in ztable.
    but all data saved except vbeln.. why it's happening? I have applied conversion also and it's showing in debug mode.
    but in table vbeln field is not appended. vbeln is primary key in my ztable.

    Hi,
       follow these steps:
    1. Create your table and add it through Append Structure in VBAK table.
    2. Create screen in Additional Data B.
    3. Field should be dic object
    4. Save and activate both Table as well as your Screen.
    Save data automatically inserted into your custome table. I did it and it is working fine.

Maybe you are looking for

  • Problem in FBL5N correspondence type..

    Hi all,   I have created one 'ZCRCT' correspondence type in FBL5N. I have assign Z program & sapscript for correspondence type.   When I create request by selecting any document no displayed using this correspondence through path   Environment ►Corre

  • HT3275 never ends to complete the first backup

    After the initial setup time capsule never finished making the first backup. 40 Mb be wanting to complete the copy and hence does not pass.

  • Try to capture the dynamic selections of a standard LDB

    Hi experts, I checked on the SDN, some people said we can use set parameter and EXPORT/IMPORT to do it. Does it mean we use this statement in the LDB and send the value of selections to memory then get them in the program? If there is a standard LDB,

  • Messenger Messaging Agent Error SPL Request 0xB106

    I restarted the messaging agent and all of a sudden SPL Request (Get Other Status) [0xB106] cn=xxxo,=xx Host is unknown to system errors started generating. I followed the TID placing the host in the host list. My host I have listed is the name of th

  • Re-installing Mail in OSX

    I have a MacBook running OSX 5.8.  I deleted the Mail application, because idiot. I want to reinstall it BUT the Install disk has OSX Version 5.5, so when I try and install from here it won't as there is a more recent version of OSX on teh computer.