Saving to jpg from many JPanels

In my JFrame there are many Jpanels. For example in one is map of the city and in the other panel is the legend to this map, anyway. How can i save graphics from two panels to one jpg. I have tried to create one temporary panel to which i add both pannels byt it doesn't work. when i try to set buffer width and hight, both methods:
tempPanel.getWidth and tempPanel.getHeight returns 0;I read that without adding my tempPanel to JFrame i won't be able to save it to jpg. Is it true? and is there any way to solve my problem?

and it works also with "ofscreen" panels(components).Interesting. I wrote the above class.
I have been able to get it to work with offscreen individual components, like JLabel or JTextField.
But, I have not been able to get it to work with a panel containing components like JLabel or JTextField. Have you found a solution for this or are you only able to get it to work on a JPanel with custom painting?

Similar Messages

  • Colors look very different when saving to jpg from psd

    I'm working on a CMYK image and when I save it to jpg from photoshop CS6, I get this difference in color:
    In photoshop:
    Viewed from Preview as JPG:
    I can't figure out what's causing this color change... I've never had problems saving to jpg before...
    Any ideas?
    Thanks!

    When you save the jpeg are you using Save As... or Save For Web...? To keep the jpeg mode as CMYK you have to use Save As and if you want the jpeg's CMYK preview to match in other color managed applications you have to check Embed Color Profile.
    In the Preview app if you choose Tools>Show Inspector the dialog will tell you what profile is embedded. In Photoshop if you choose Document profile from the pop-up in the window's lower left corner, the document's assigned profile will be listed. The Preview and Photoshop profiles have to match in order to get the same color soft proof:

  • Writing jpg from jpanel

    Hi.
    I want to write a jpg-file showing the contents of a JPanel. Is there any way to do this?
    Greetings,
    Feanor's Curse

    Im using your method to save a JPG image from a JPanel too
    It isn't working for me.
    I am running a command line version of my program, but still need to save the JPanel.
    I am just getting a blank image saved.
    Obviously, I think, the problem is that it never gets inserted into a Frame (as I don't have one!) so is never visible. The 'paint(Graphics g)' is obviously too clever and not drawing it, when not in view?

  • Batch Saving jpg from Camera Raw PSE 6 for Mac

    I'm running PSE 6 for Mac.  I'm shooting in RAW to retain all  data from sensor.  My work flow is straight forward.
    Review photos on CF card and do initial throw away of bad photos. 
    Download from CF card to Backup drive to preserve original photos. 
    I upload photos to Bridge, keyword, grade, and copywrite, etc. then open in Camera Raw and process as necessary; exposure, recovery, sharpen, fill-in, crop, fill-in etc.
    Select all and do a save (default is .png) to save my changes.  Since Camera Raw will not save to jpg format I open in PSE6
    My workflow can change here depending on what my end product will be but usually I'll send some photos out to share which is the subject of another post.  I can't make the program resize more than one photo for email even though I have all of the photos I want to email selected in the film strip.
    Anyway my process for batch saving to jpg is as follows:
    Select all of the photos (I will select only those that have been cropped to the same size such as 4x6) in the film strip.
    Open File > Process Multiple Files
    Fill out the dialogue box (see attachment) and press OK
    The next thing that happens completely negates the automated process, I get the Save As Dialogue box for every photo (see attached)
    I delete the "copy" text and save
       6.  Some of the photos turn out black under preview in finder
       7.  When I try to reopen the jpg in PSE6 I get an error message (see attachment)
    Any help is appreciated.

    love2kruz wrote:
    I'm running PSE 6 for Mac.  I'm shooting in RAW to retain all  data from sensor.  My work flow is straight forward.
    Review photos on CF card
    Stop right there!  That's a very bad idea.   You should not be viewing images that are still on the card.  Download them to your local hard drive first.  Otherwise you run the risk of the software writing to the card and destroying the format.
    This excerpt is from a long-gone post by author Bruce Fraser:
    Bruce Fraser - 4:17pm Jun 14, 04 PST (#5 of 21)
    Opening files directly from the camera is a bad idea for a variety of reasons*, and it most certainly isn't faster than using a FireWire or USB2 card reader.
             • Drains the camera battery
             • Runs the risk of the software you're using to open the images writing to the card and destroying the format
             • Runs a small but significant risk of USB power frying the camera
             • Slowest method known to mankind of getting images off a CF or SD card

  • Editing TIFF files from camera and saving as JPG

    I have searched extensively for this and feel like it must be answered somewhere but haven't found it. Call me an idiot.
    I have a camera that can save a picture as a tiff and jpg files simultaneously.
    When I open the tiff file in PE2 it is strange. It something like a negative and strange colors. In addition, it seems to have a small portion from the right side that has moved to the left side of the picture.
    Does this mean there is something wrong with the tiff files?
    I have tried opening it and saving as jpg. Then opening the jpg just shows the same strange image.
    Do I need a newer version of PE?
    Thanks

    Well I found something finally on the internet. Apparently it is a problem with the 2GB SD card in my Panasonic FZ20 properly storing the file. I will have to look into it more. The card is an Ultra II San Disk. The sorry part is that the accompanying jpg is much smaller than if I taken the picture as jpg to start with.
    See the following link if you have a similar problem.
    http://forums.cnet.com/5208-6035_102-0.html?forumID=58&threadID=217710&messageID=2319052

  • Saving images as JPG from Bridge

    I am shooting images in colour sRGB and RAW which come in as .CR2 files.  I work with them in Adobe Bridge (CS5) and then save them as JPGs from bridge.  The final JPG images are colour mode is RGB and the colour Profile Adobe RGB (1998).  This is causing me problems when I print at the images come out flat.  I have been advised that I need the images to be sRGB for print.  How do I achieve this with Bridge?  It has been suggested that I use the Canon software Digital Photo Professional!!  Do I have to?
    HELP please.

    The final JPG images are colour mode is RGB and the colour Profile Adobe
    RGB (1998).  This is causing me problems when I print at the images
    come out flat.
    That sounds more like a color management printing issue.
    So you browse the RAW files from Bridge and use Adobe Camera Raw to process and open the file? Yes, there is a setting in ACR to open the image as sRGB. (But, you will probably get better results by learning how to properly print an Adobe RGB file.)

  • IPhoto Won't Import JPGs from Photoshop CS2

    Hello,
    I find that if I save a JPG from PS CS2, it will open in Preview, and other applications, but will not import to iPhoto. I have read the other posts here on this topic, but they have not addressed my experience.
    For me, it does not matter whether ".jpg" is added or not. If I open the file in Preview, and simply re-save it, with no other changes, it will import to iPhoto as usual.
    Thoughts?
    Thanks!
    Michael Morrison

    Hello,
    Thanks for your thoughts.
    I do have color management turned on, and the profile is Adobe 1998, rather than sRGB. When I re-save the file in Preview, I am also saving it with Adobe 1998, so it does not appear to be the presence/absence of a profile, nor the type of profile (sRGB or Adobe 1998).
    Further, the article you suggested indicates that this is a problem related only to Power PCs, and I have this trouble on botht Power PCs and Intel machines.
    Further thoughts?
    Thanks again,
    Michael Morrison

  • While saving multiple attachments from mail, files with same name are added and not replaced

    While saving Multiple Attachments from Mail, existing file with same name are not overwritted but new files are added in the folder.

    Bjørn Larsen a écrit:
    Hi all
    Hope to get some help with Elements Organizer.
    I have 12-15 years of digital photos that I now want to import into my newly aquirede Adobe Elements Organizer / Photoshop. Since my Nikon names the files with continous numbers from 0001 to 9999 I have multiple files with the same name although they are not alike at all. My previous software had no problems with that since I keep the photos in separate file folders based on import date. I generally import photos after each event and so name the folder with the date and some event info (e.g. 2014.12.24 - Christmas at grandparents).
    That is a common situation, I have the same limitation for files not going over 9999 on my Canons...
    Now - when I import my photos into Elements Organizer I get a lot of error messages with "same name exist .....) Hmmmmmmm
    Please sate the exact wording of the error message, I have never seen a message stating 'same name exist...' or equivalent; only messages about files already in the catalog. Files already in the catalog mean that some files have the same 'date taken' and file size in Kb.
    Any suggestions. I'm using a mac and tried to rename files based on date taken. The mac can do that but it takes ages to go into each folder and run the renaming script there.
    I also use a similar folder creation scheme (such a date naming is the default for the downloader). That way I never get a message about duplicates for the same file names.
    However - I can't be the first or only person with this problem so I figure that some workaround must be known out there. Maybe the import action can recognize date taken or - well. Thank you very much in advance if you can help me out here.
    You can alsways set the downloader to rename the imported files with a unique new name, there are many options in the 'advanced' dialog of the downloader. I don't know about Macs, but I don't thing there is a difference.

  • How to control the Cost Center incurred value posted from many transactions

    In KP60, cost center wise , element wise budget is allocated .i.e planned. Ex: 450000 is assigned and saved.
    Now ex: in FB60, when we post a vendor invoice having the value greater than the above value, system should not allow.
    Like this, the cost to the cost center can be incurred to the cost center not only in FB60 , but also from many transactions.

    Is it possible that you mean KP06? (not KP60???)
    Because if this is the case KP06 is only for planning...not budget.
    Please clarify..
    Pan

  • Have made some slide show libraries on publisher then saved as jpg however when I sync through itunes to my ipad the previous import is over written. Can anyone offer a solution. Thanks

    Have made some slide show libraries on publisher then saved as jpg however when I sync through itunes to my ipad the previous import is over written. Can anyone offer a solution. Thanks

    I have tried much of the same - still no joy.
    I also reported it as a bug to Apple although the response page said "we can't reply to messages"
    For now I have had to turn off auto syncing and keep plugging and unplugging until the device is recognised correctly - about 1 in 10.
    In my email to apple I also listed the contents of the xml file that keeps track of the devices that iTunes has seen:
    When seen as an ipad:
    <dict>
    <key>Connected</key>
    <date>2010-06-08T21:33:57Z</date>
    <key>Device Class</key>
    <string>iPad</string>
    <key>Family ID</key>
    <integer>10006</integer>
    <key>Firmware Version</key>
    <integer>256</integer>
    <key>Firmware Version String</key>
    <string>3.2</string>
    <key>ID</key>
    <string>8F98884620E0F9FF</string>
    <key>Serial Number</key>
    <string>V5020116Z39</string>
    <key>Updater Family ID</key>
    <integer>10006</integer>
    <key>Use Count</key>
    <integer>21</integer>
    </dict>
    When seen as an iPhone:
    <dict>
    <key>Connected</key>
    <date>2010-06-08T21:39:07Z</date>
    <key>Device Class</key>
    <string>iPhone</string>
    <key>Family ID</key>
    <integer>10006</integer>
    <key>Firmware Version</key>
    <integer>256</integer>
    <key>Firmware Version String</key>
    <string>3.2</string>
    <key>ID</key>
    <string>8F98884620E0F9FF</string>
    <key>Serial Number</key>
    <string>V5020116Z39</string>
    <key>Updater Family ID</key>
    <integer>10006</integer>
    <key>Use Count</key>
    <integer>22</integer>
    </dict>
    You will see from the Use Count that these are adjacent connections, ie plugged in as ipad then as iphone. Apart from the device class, everything else is the same.

  • MX922 -Problem opening scanned photos saved as jpgs

    When I scan a photo, the image is saved as jpg but cannot be opened by Preview or iPhoto. Message: "file is damaged or is in an unrecognizable format." I scan from my pc, as the printer "defaults" to "set the pc to start scanning." The file extension says jpg but in the settings menu pull-down it's listed as jpg exif. Even if I choose png, I get the error message. What's the problem? 

    Hi KLS!
    Welcome to the Canon Forums and thanks for your post!
    To have a better understanding of your issue, please let everyone know what operating system (Windows Vista/7/8 or Mac OS 10.X) you are using. That way, the community will be able to assist you with suggestions appropriate for your product.
    Any other details you'd like to give will only help the Community better understand your issue!
    If this is a time-sensitive matter, our US-based technical support team is standing by, ready to help 24/7 via Email at http://bit.ly/EmailCanon or by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
    Thanks!

  • I can't seem to save a high resolution jpg. from a raw file?

    I am trying to save a large resolution jpg. from a raw file. When I save as at the highest level its only saving the image at around 2mb ?

    I am trying to upload a file to print on canvas in raw my photo is 30mb but when i try and save it thru photoshop as a jpg. Its so compressed the site wont even except it because the resolution is to low?  
    Thanks for any ideas,
    Tom Pytel
    480-650-2495
    Tom Pytel
    480-650-2495

  • My question is Itunes related.  How do you prevent a playlist saved in Itunes from alphabetizing the song list created. I wanted to keep the original order, and somehow everything was alphabetized without requesting it.

    My question is Itunes related.  How do you prevent a playlist saved in Itunes from automatically alphabetizing the song list.   I had a specific order of songs that I wanted, and Itunes somehow automatically alphabetized them.  Is there a way to turn that feature off, and/or get them back to the original order?   I also noticed that once a playlist has been created, I cannot manually changed the order of the songs from my desktop..  Any suggestions?

    That's just the sort order. It's displaying the media alphabetically because you have clicked on the NAME column near the top of the iTunes window.
    Click on the little triangle above the column of numbers (usually on the far left side of the main iTunes window) and the media will sort in the order in which you added each item to the playlist.
    You can easily reorder songs within a playlist: Click and HOLD on the song you wish to move, then drag-and-drop it wherever you like.

  • How do I stop my MacBook Air saving every picture from web sites I visit

    How do I stop my MacBook Air saving every picture from any websites I visit mainly cars

    What browser are you using?
    Have you tried a different browser?
    Ciao.

  • How to move worksheet saved on database from one instance to another?

    Hi Every one,
    How to move worksheet or workbook saved on database from Discoverer plus from one instance to other instance?
    Is there any way to save a workbook or work sheet on to local drive from discoverer plus.?
    Thanks
    santhosh

    Hi,
    You have 2 options: use Discoverer Administrator to export/import the workbook; or use Discoverer Desktop to save the workbook to the local drive.
    You cannot save a workbook to the local drive using Discoverer Plus.
    Rod West

Maybe you are looking for