Image lost in action, workaround anyone?

Hi,
I know this is a double post but I really want an answer to this so that I can move on.
BufferedImage  BufImage = new Robot().createScreenCapture(screenRect);
                    int[] pixels = new int[1680*1050];
               PixelGrabber pg = new PixelGrabber(BufImage, 0,0,1680, 1050, pixels, 0, 1680);
               image = frm.createImage(new MemoryImageSource(1680,1050,pixels,0,1680));With this code the Image image doesn't go null but it can't be drawn to a JPanel in my test.
But the same image (BufImage) can with this:
                        BufferedImage  BufImage = new Robot().createScreenCapture(screenRect);
               image = (Image) BufImage;In the first example the image get lost somewhere, but why? I am extracting the pixel correctly, aren't I? I need to use both some kind of PixelGrabber and then I need to create an Image of the result.
Can anyone help me clear this out, I'd really need to extract those pixel for an application.
//Considerate

I found the problem, I was creating the image with the wrong JComponent.
Replacing the row
image = frm.createImage(new MemoryImageSource(1680,1050,pixels,0,1680));with
image = pan.createImage(new MemoryImageSource(1680,1050,pixels,0,1680));where pan is a JPanel instead of using the JFrame.
Sorry for taking your time, and thanks to everyone who viewed this and gave time to try to figure it out.
//Considerate

Similar Messages

  • I have updated my 4s iphone to ios 6.1.3 and have trouble connecting it to wi fi . i tried to back up it on itunes and then restore it but now i have left with a phone that still doesnt connect to wi fi and  lost all my data. anyone knows how to fix it?

    i have updated my 4s iphone to ios 6.1.3 and have trouble connecting it to wi fi . i tried to back up it on itunes and then restore it but now i have left with a phone that still doesnt connect to wi fi and  lost all my data. anyone knows how to fix it?

    If no change after restoring the iPhone with iTunes as a new iPhone or not from the backup, there is a hardware problem.

  • On iOS 8.3 using 'Keynote for iPad' the app freezes repeatedly (since the last update of April 21st) while editing slides. 30 sec. later comes alive again, then freezes again after a few editing actions. Anyone with the same problem?

    On iOS 8.3 using 'Keynote for iPad' the app freezes repeatedly (since the last update of April 21st) while editing slides. 30 sec. later comes alive again, then freezes again after a few editing actions. Anyone with the same problem?  I tried everything 'app support' tells me except deleting and reinstalling the App because I have a lot of files that I'd lose.  Recommendations anyone?  [email protected]

    On iOS 8.3 using 'Keynote for iPad' the app freezes repeatedly (since the last update of April 21st) while editing slides. 30 sec. later comes alive again, then freezes again after a few editing actions. Anyone with the same problem?  I tried everything 'app support' tells me except deleting and reinstalling the App because I have a lot of files that I'd lose.  Recommendations anyone?  [email protected]

  • How to change images based on action.Even clicking changed images should ?

    how to change images based on action.
    Even clicking changed images should do respective actions.
    and while displaying only one image at a time sholud get displayed.
    I am using three images for a single column of a table in Jsp.
    Any clues.
    Any link for any good javascript html jsp site where i can find some good solution.
    vijendra

    In broad way if i say i have multiple situations in mutiple tables where i need such a logic to operate in for all tables.
    lets say in first time load of page by default one image will be displayed (one with sorted order for first column rest all non sorted)Now after every click to any image respective sort should get called.along with all images should get changed.Here with every function one/two images will get effect at least.
    As in first if i say sort by desc then this image will change rest all will remain in unsort form.
    when i move to other column and click on new image the previos will convert to unsort and new one will convert to sort by ascending. rest all will be in unsort form as it is.
    Now it seems like same logic is required with two three conditions.
    even for everyaction different parametrs has to be passed at differnt situations.
    Any good idea if someone can suggest.
    I will be very greatful for him.
    thanks
    vijendra

  • I am trying to print a  jpg, centered on the page, to epson printer and the printed image is off center, does anyone have a sense about setting to check?

    i am trying to print a  jpg, centered on the page, to epson printer and the printed image is off center, does anyone have a sense about setting to check?

    right click a blank area of the toolbar, click Customize. You'll see the printer icon there. Drag and drop it to where you want.
    You can also find this option under View -> Toolbars -> Customize.

  • When i plug my 3rd generation ipod touch into my computer, itunes doesn't notice it, and the computer says it is just a digital camera. i can only see the images on it. Can anyone help?

    When i plug my 3rd generation ipod touch into my computer, itunes doesn't notice it, and the computer says it is just a digital camera. i can only see the images on it. Can anyone help?

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with              
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Before you reinstall the Apple software, also remove iCloud vi Control Panel Remove programs. The reinstall the Apple programs
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • I have an imac and an Apple TV. Both have performed well displaying computer voice and audio onto my TV. For some reason I have lost the Audio - Can anyone help?

    I have a ini mac and an Apple TV. Both have performed well displaying computer voice and audio onto my TV. For some reason I have lost the Audio - Can anyone help?

    Hi there,
    You're running an old version of Safari. Before troubleshooting, try updating it to the latest version: 6.0. You can do this by clicking the Apple logo in the top left, then clicking Software update.
    You can also update to the latest version of OS X, 10.8 Mountain Lion, from the Mac App Store for $19.99, which will automatically install Safari 6 as well, but this isn't essential, only reccomended.
    Thanks, let me know if the update helps,
    Nathan

  • Updated my iphone4 to version 5 have lost my calender can anyone help

    updated my iphone4 to version 5 have lost my calender can anyone help

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • I backed up my iphone via icloud and restored it and lost dates notes photos anyone help

    i backed up my iphone via icloud and restored it and lost dates notes photos anyone help

    i backed it up to icloud and pc. but when i went to restore i got sum contacts back but not the latiest contacts. and no photos and notes gone. but i did notice that that bk up date was changing is there anyway i can look at all the back ups ????

  • I'm really disappointed with new 5 update.  No music, No photos, No videos, lost all emails.  Anyone know how to get these all back?  Yes, I have synced and synced and synced.  Help

    I'm really disappointed with new 5 update.  No music, No photos, No videos, lost all emails.  Anyone know how to get these all back?  Yes, I have synced and synced and synced.  Help

    Hopefully it isn't too late for this but:  before performing an update it is really best if you close all apps (double click the home button, click and hold on one of the apps that appears at the bottom of the phone until the red minus sign appears and then tap the minus sign until all apps are closed) and then turn the phone off by holding the standby button until the slider saying "slide to power off" appears and slide it to turn the phone off.  Then turn the phone back on and hook it up to your computer to sync and perform the upgrade.  This also helps if you do this before performing syncs too.  I had problems with an iPod previously where it would fail to backup before sync most times, but have never had a problem with updates or syncs since I started performing this procedure.  Unfortunately, your pre-update backup may have failed and the data in your apps might be gone, but you could try to restore your phone.  If I remember correctly how to do this, you connect it to your computer and check for updates.  It should say you're up to date, but have an option to restore the phone.  If it does, I'd try that.  It may also have a "restore from backup" option you could try.

  • TS3899 I have lost the action buttons at the bottom of my emails

    I have lost my action buttons at bottom of my emaild

    Shut down and restart the app...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon until they wiggle
    - Press the red to delete the offending app from this list.
    - Press the home button twice when done.
    - Restart the app

  • Images lost in converting Word 2007 file to PDF

    I have a Word 2007 document (docx), with inserted JPGs.  If the text wrapping of the images is set to anything but "in line with text", the images do not appear in the PDF file created from the docx.  I have tried many different combinations of Acrobat preferences (image compression on or off; standard vs. high quality print; different DPI settings; etc.).  This appears to be a new problem, as I have converted many Word docx's with images to PDFs in the past.  A document that I converted to PDF a year ago no longer converts properly!   I'm running Windows 7 Pro and using Acrobat Pro X.   Office 2007 has SP3 (and I suspect that's the problem).  Has anyone else had the problem, and, if so, found a fix?

    Hi, Bill,
         I have the doc/docx converter, though I haven't tested if if gives any different result from letting Word 2003 simply open the docx.   I'm on travel now and can't test this until later.
         The doc file looks perfect in Word 2007 on my Win 7 machine.
          Printing to Adobe PDF gives the same problem - no images.
         Re positioning with reflow:   I'm not sure exactly where you find options termed 'reflow,' but I tried 3 options in Compatibility and Layout (Word options --> Advance --> Compatibility options): 
    In the menu of Compatibility options: "Lay out this documents as if created in Microsoft Word 2003"
    In the sub-menu Layout options: "Use Word 2003 indent rules for text next to wrapped objects"
    In Layout options: I turned off the indent rules and chose "Use printer metrics to lay out document" (and I used this with "Create PDF" inside Word 2007 and with print to Adobe PDF)
    In all 3 (or, really, 4) cases, the images were lost.  Please let me know if any of these options comprise the reflow options.  Please note also that I'm not trying to print the document, as I think you realize; I want to create email-able PDFs that have positioned images, as I have always been able to do in the past. 
    If there's not much more to tweak here, I may bit the bullet and do a system restore to pre-SP3 update on Office 2007.   Tedious, but no more tedious than all the things I've tried so far.
         Thanks,  Vince

  • Images lost after rebuilding aperture database

    Hi,
    After updating to Yosemite, Aperture started to show problems/ freeze etc. I could not acces my photo's and after updating Aperture 'it' announced that the libraries had to be rebuild.
    These are images stored on a external harddrive and we're talking about over 3000 images. (over 4 years of family holidays to be exact so they are very valuable)
    I left it running day and night, and after 4 days it was still rebuilding, which is understandable for that many pictures.
    Sadly a family member did not realize that the plugged in harddrive was running and unplugged it after 5 days......Naturally Aperture showed an error. When I plugged the drive back in Aperture asked to finish rebuilding the libraries. Yet when I said yes it was finished in 3seconds and Aperture won't start up nor will it show me the libraries.
    While the harddrive contained 2tb of info before, it's now only 500MB. It seems like 1/4th of my images are just gone. nowhere to be found and Aperture won't start back up.
    Did anyone else encounter this problem or are there any measures that can be taken to possibly resolve the images?
    Any suggestions are greatly appreciated.

    Do you have any vaults or other backups of the images? I think that's what you'll need to look into. If the space is free on the drive, the images are gone.
    I haven't known Aperture to delete images. Is the Aperture library also stored on the external storage, or was it on an internal drive? It's most likely that something corrupted the external drive and lost the images, and also corrupted the Aperture library. I actually have had this happen to me once - in my case I also had some music files go missing from my iTunes library, which is why I think some external factor was at play.
    Thankfully I had a backup (I have Aperture vaults, and a separate Time Machine backup, as well as an online backup with Backblaze). Hopefully you have at least one method of backup as you're going to need it.

  • Image 'lost' from Project

    Anyone had experience of loosing images?
    Have been slowly exploring adoption of Aperture in workflows. Following sequence adopted resulted in images being 'lost' - Not a good thing!:
    1. import existing images into different Image Projects - mostly RAW NEF files
    2. Under each Image Project, select & adjust images, create and arrange selected images in a project-specific Light Table - each Light Table to be a spread in a Book
    3. Create a separate Book Project and within this a Book Album
    4. Copy the Light Tables (drag-n-drop) from the source Image Projects to the Book Project
    5. Copy the selected images from each Light Table into the Book Album for layout on different spreads
    In itself a pretty naff sequence as it quickly becomes apparent a major shortcoming here is that you need to do the layout & re-sizing steps twice - once for the Light Table direction then again for the Book Layout (and I thought computers made repetitive tasks a thing of history).
    However - and I've repeated this - what you find is Images end up in the Book but Magically disappear from the Light Table Albums as well as the Original Project. Not a feature I really want.
    I asked at the local Apple Store Genius centre and they at least provided relief that the image is not 'lost' forever - just to Aperture. There's a neat trick for drilling down the Aperture project database: a right-click (cntrl-click) on the Aperture project database will give you a menu item ' Show Package Contents' which then reveals all projects - and successive right-clicks then allow you to drill down the images so you can actually search and find using Finder. It's rescued me with only a few hundred images at present in the system - but I'd hate to be searching through a few thousand.
    Is there an easier way for Aperture to repair the database?
    Until I'm confident in the image storage, Aperture will remain just experimmental.
    Dual 2.5G5 1.5GB   Mac OS X (10.4.3)  

    Basically, dragging a file from one Project to
    another actually moves the original file and removes
    it from the original Project.
    Not true if you are dragging Albums from one Project to Another - a legitimate expectation in a profesional workflow - and fluid workflow support is after all a core promise of Aperture.
    Moving or copying Albums (eg drag-n-drop of Light Table Album) leaves the original Project intact. Or so it should do. But it doesn't. Instead odd images randomly disappear from the original project - and the Album.
    As another respondent said, the biggest problem is not thatthey disappear forever - you can dig around and retrieve them - but that you don't know what's suddenly disappeared from sight unless you know your projects image-by-image.
    Loosing stuff from a database is the biggest no-no of any application and Apple need to fix this one fast - or at least have a repair mechanism.

  • Border of image lost when connecting iMac to TV

    When I connect my 27" iMac to my Panasonic TV a portion of the image is lost on all four borders. How can I get the entire image to be viewable on the TV?
    To connect the iMac to the TV I'm using a mini-DisplayPort-to-DVI adapter and an HDMI cable with a DVI connector on one end.

    My TV had its HD size set to 1, which turns overscan on, resulting in the loss of the edge. I changed HD size to 2 and now there is no loss.

Maybe you are looking for