Image to bufferedImage takes several minutes

Hi,
In my program I try to convert java.awt.Image to java.awt.image.BufferedImage:
public static BufferedImage image2BufferedImage(Image img,int w,int h){
BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bi.createGraphics();
g2d.drawImage(img, 0,0,w, h, null);
g2d.dispose();
return bi;
When the image is large, g2d.drawImage(...) takes several minutes. Someone can say me what's happen?

How i can do it?
maybe (java -Xmx125M ...)I use: java -Xmx300M
Did it work?

Similar Messages

  • Why is does my apple run SLOW.you go to open a program and the circle thing just spins for a delayed period of time.  You change from typing in a word doc and go to say email or internet and it takes several minutes to allow you open anything up.  Like it

    Why is does my apple run SLOW.you go to open a program and the circle thing just spins for a delayed period of time.  You change from typing in a word doc and go to say email or internet and it takes several minutes to allow you open anything up.  Like it is frozen.  I have tried rebooting the computer and it works for a few minutes then gets stuck.

    Which model iMac do you have?
    How large is your HD and how much space do you have left?
    Check out the following & do the necessary: 
    User Tip:  Why is my computer slow?
    What to do when your computer is too slow
    Speeding up your Mac
    OS X (10.6.6)
    Use Software Update or the OS 10.6.8 combo update to update your OS.  Also, update everything SU has to offer for your computer.  When done, repair permissions and restart your computer.

  • My macbook pro (lion 10.7.2) takes several minutes to connect to the internet after waking from sleep.  Is there any way to make this instant?

    Hi
    My Macbook Pro 15 inch takes several minutes to be able to connect to the internet after waking from sleep.  Does anyone else have this problem and is there a fix?
    Alan

    coxorangepippin wrote:
    The message that comes up when I click on "TomTom Home Install" is "You cannot open Home Install because Power PC applications are no longer supported." Does this mean that the TomTom, which is absolutely vital to my life - well, not literally but you know what I mean - can no longer be used with my MacBook Pro?
    What that means is that is can't be used with Lion 10.7.  PowerPC was the chip Apple used up until 2006 when they switched to Intel.  At that point, they created the Rosetta emulator to allow for PPC support for 5 years.  They finally dropped the support with the release of Lion.  It will only work with OS X 10.6 or earlier.  The other option is to purchase a new GPS, which can be had for $100 for a decent one.

  • How can I resolve an issue where webpages take several minutes to download? Other computers working on the same home network take not time at all.

    Firefox would not load webpage despite there being an active internet connection to the computer. I know this because firefox loaded on another home computer without any issues. I reset the ip address on the computer in question through cmd.exe and this helped the issue to an extent however it take several minutes to load webpages. I can also advise tha Internet Explorer suffered exactly the same issue and it gave me an error message early when unable to load webpages, that a remote firewall may be blocking the connection. It suggested to configure the firewall to allow connections thru TCP port 80.

    Hello ,
    Can you please post your ADSL stats by following this direct link; http://192.168.1.254/index.cgi?active_page=9116 << it only works if you have a Home Hub 2.0+ and remember to type your password in.
    Also we need a speedtest Use this link http://bt.custhelp.com/app/answers/detail/a_id/9354/c/346,4740,5520 as it will also help you diagnose and give you a list of solutions afterwards, it does incorporate the http://www.speedtester.bt.com one though as well.
    It sounds to me that you have a low profile, with your stats we can see if you've been having disconnections which makes the exchange raise your Noise Margin to try and increase your stabibility, but at a cost of speed, it may have been that your sync speed has recovereed, but not your IP Profile.
    Here are some helpful (I actually did find them helpful!) tips from BT: http://bt.custhelp.com/app/answers/detail/a_id/35079 up to you whether you want to read those tips, because I did actually find them helpful.  
    Can you comfirm that you have no noise on the line.  Really a test by dialling 17070 and pressing option 2 for the quiet line test should be completed in the Master Socket with no other devices connected to the line.  ANd also do you have a master socket with a split faceplate that you can unscrew the bottom half, if so behind there is a hidden 'test socket', it disconnects all your internal wiring so just to make sure its not a fault inside your premises.
    Regards Edd
    Check your Line
    BT Speedtester

  • In Windows Vista 7, SP2, Firefox takes several minutes to launch, is non-responsive, hangs sometimes launches additional windows without my clicking. I get error code 10003.

    I'm using Firefox 6.0.2 in Wndows Vista 7, SP2. I'm using Norman Security Suite anti-virus software. Firefox behaves erratically. Sometimes it takes several minutes to launch. If I launch an new window it sometimes hangs. It launches two extra windows without my having clicked to launch. Always two. I get an error code 10003 but when I search for this I get no information about it.
    Windows Task Manager shows plugin-container for Firefox running in addition to firefox.exe.

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Restore the default home page
    * https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page#w_restore-the-default-home-page
    Clear Cookies & Cache
    * https://support.mozilla.com/en-US/kb/Template:clearCookiesCache
    Clear the Network Cache
    * https://support.mozilla.com/en-US/kb/How%20to%20clear%20the%20cache#w_clear-the-cache
    Check and tell if its working.

  • T430s Takes Several Minutes to Shut Down

    Hey all,
    I've got a T430s running Windows 8.1. The machine runs great and boots very fast (probably helps that I bought an SSD); however, when I shut down, it takes several minutes (5+ minutes) to fully power-down. The screen goes black, but USB devices continue to have power and the fan still spins until finally it powers down. The same issue happens when I close the lid and put the machine to sleep.
    Before anyone blames Windows 8.1: This didn't happen right after I upgraded to 8.1. It seemed to start several days after the 8 --> 8.1 upgrade, and I'm not sure what variable changed to cause this.
    Any ideas? Thanks!

    Nothing in either the System or Application logs that would indicate that there were any problems shutting down. I can see where User32 indicates that the "power off" shutdown has been initiated, then about 5 more log entries in System after that, all of which appear to be normal (i.e. related to services shutting down). The time on these records are all within a few seconds of each-other. I don't see any outliers that are a few minutes out (i.e. things logged several minutes after the shutdown).
    One thing I did just notice is that I see the following Critical notice from Kernel-Power after booting up from shutting down:
    The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
    So it's not even going down cleanly. But I still have no idea what the offending driver/service/app is.

  • Javascript (in Firefox 3) takes several minutes to start working when computer wakes from sleep, Mac OSX 10.5.8

    Whenever I wake my Mac from sleep, with Firefox having been left running, some parts of Firefox take several minutes to start working again. These include switching between open tabs and any website functionality that uses javascript, eg gmail. This has gone on through many updates of Firefox. If I quit Firefox immediately on waking the Mac and restart it, everything is OK.

    The following worked for me:
    http://support.mozilla.com/en-US/questions/684867
    "Problem: I had the same problem but with mac osx 10.5.8, Firefox 3.6.6 sometimes prints and sometimes does not, but the preview was always blank and I could not save to pdf file.
    Solution: I downloaded Firefox 3.5.10, installed it on my desktop and opened it, tried print preview and it worked, quit Firefox 3.5.10 and ran 3.6.6 and voila! print preview is working fine and I can save to pdf fine.
    I guess running 3.5.10 fixes the profile in a certain way. I have no idea how that happened but it worked."

  • OSX 10.9.5 start up takes several minutes to connect to internet

    My mac mini has now got a faster boot up time since having a SSD installed.  However, I have noticed it takes several minutes for it to connect to the internet.  Under Login Items, I use to have my NAS setup to connect a drive on start up.  But, I always received the error "There was a problem connecting to server."  I removed it.
    What I have tried so far:
    Upgraded from 10.8.5 to 10.9.5, that didn't change anything.
    I have a Airport Extreme router (7.6.4) and even swapped it out for a Linksys router to see if that was the issue.  That didn't matter.
    All new ethernet cables for the router and mac mini.
    Firewall turned off on OSX.  I have since turned it back on since that didn't change anything.  I do have Little Snitch running too.
    Any other suggestions would be greatly appreciated.

    Welcome to the Apple discussions.
    When you say your machine is near capacity ... you want to keep at least 10% of your hard drive empty for systems usage. Less than that and the system slows way down.
    One thing you can do is to use this tool to see what your largest files are on your system - move data to an external hard drive and delete, or just delete unused/un-needed data: http://software.filefactory.com/Mac/WhatSize_10-3-91.html
    You might also run MacJanitor to run the daily/weekly/monthly scripts, which sometimes don't run automatically: http://personalpages.tds.net/~brian_hill/macjanitor.html. Some have found using a utility like OnyX can help with disk space. OnyX is available from http://www.titanium.free.fr/pgs2/english/download.html . Note OnyX does the same thing MacJanitor does, plus much more.
    You can use Monolingual to delete the languages you know you'll never use from the operating system - depending on choices it can save over 1GB. Choose language options carefully, as you can muck things up if you rush through it: http://monolingual.sourceforge.net/
    This FAQ is good reading on maximizing disk space: http://www.thexlab.com/faqs/freeingspace.html

  • When i ask my macbook air to print it tells me it is looking for my printer it takes several minutes before it finds it and then prints, why is that as my wife is connected to the same printer in the same way (bluetooth) and hers prints straight away

    As per my question, when i ask it to print it tells me it is looking for my printer this takes several minutes before it prints.  my wife is in the same room using an imac also using a bluetooth connection to the same printer and hers prints immediately.  why is this.

    Perhaps you could try this to resolve your issue:
    *How to Reset the Printing System*
    1. Open System Preferences > Print & Fax
    2. Move your mouse over the Printers list
    3. Hold down the Control button and click the mouse (or right click if supported).
    4. Click "Reset printing system ..."
    5. Restart your Mac
    This will remove your print queues but not your printer drivers. So you will only need to add your print queues again.

  • Yaourt takes several minutes before start downloading

    Hello everyone, I'm having a problem when I want to deal with any package in AUR repo using yaurt. It takes several minutes before start downloading.
    For example:
    $:> time yaourt -Ssa package-query
    aur/package-query 1.1-2 [installed] (1656)
    Query ALPM and AUR
    aur/package-query-git 20120121-1 (198)
    Query ALPM and AUR
    real 1m5.524s
    user 0m0.287s
    sys 0m0.053s
    Any suggestion???
    Thanks in advance!!
    *sory for my englsh, I'm from Argentina. ;D
    Last edited by emab73 (2012-11-20 16:14:55)

    I know it doesn't answer your specific question but you could experiment with another AUR helper.  Or just use makepkg.

  • Opening Excel 2010 files from Explorer takes several minutes

    I am running Excel 2010 on Windows 7. For the last year I have had no problems, but today I find that if I try to open any file from Windows Explorer (e.g. by double-clicking it), or from an item pinned to the Task Bar, it takes several minutes to open Excel.
    If I open Excel directly it opens very quickly. I can also open any of the "problem" files in an instant when Excel is open (e.g. from the Recent Files list or from  the File...Open dialog). All of the files in question are on the local hard
    disk.
    I don't have this problem with MS-Word.
    I saw another post here which recommended unchecking the "Ignore
    other applications that use Dynamic Data Exchange (DDE)" option, but I didn't have this option set in the first place.
    Does anyone have any other suggestions for fixing this?

    Double click an excel file, when the excel loading window appears, start Task Manager, terminate the excel process, then re-open the excel file to test if this issue goes away.
    Also someone resolved this issue by installing an add-in. Have a try.
    File->options->Add-ins->Select "Excel Add-Ins" in Manage list box and click button "Go..." ->Tick the add-ins that you want and click button "OK" 
    http://excel2007-slow-open-file.blogspot.in/

  • User login takes several minutes

    Please let me know if anyone has experienced this issue or know how we can troubleshoot. We upgraded our BI Apps from 7.9.6 to 7.9.6.2. Following the upgrade, everything works fine but logging in using any user credentials can take several minutes.
    This includes logging into Catalog Manager, logging into OBIEE dashboards using BI Server authentication, and logging in using the MS Office plug-in. It does not take a long time when using external table authentication. This makes me think it's an issue with BI server authentication and the RPD.
    Does anyone know what may cause this problem? Oracle support has no clue so I thought I'd check with the OBIEE gurus on this forum. Thanks.

    Yes I figured out the problem right before I read your message. Thank you.
    For some reason the BI Apps 7.9.6.2 RPD enabled an init block that was not previously used in the out of the box 7.9.6. I just caught that it was enabled so tested out disabling it and it seems to have resolved the problem. The init block name is User Hierarchy Level
    The log files did not show any errors despite increasing the login time by a few minutes.

  • Designer takes several minutes for login using LDAP authentication

    We have a issue, when we tried to login to the designer using LDAP authentication it takes several minutes and using enterprise account we are able to login to the designer with in seconds.
    CMC and infoview all are working fine using LDAP authentication.
    We are using BOXIR2,
    FP 1.6.
    Thank You in Advance.
    Thanks & Regards,
    Collin.

    There have been several changes in LDAP since FP 1.6 but if infoview is ok then hopefully you aren't running into any of them. When logging into client tools the LDAP requests are sent to the LDAP server directly from the client. An issue like this would suggest there is a problem reaching the LDAP server from the client.
    Is LDAP SSL being used? If yes try disabling it, if no then you can packet scan the logon attempt on the client and filter the LDAP traffic to see how long it's taking for that communication.
    Regards,
    Tim

  • IPod locks up and takes several minutes to unlock

    I have a 20 GB ipod with photo capabilities that is about a year and half old. Often times it will lock up, even when the "hold" is switched into the unlocked position. It ususally takes several minutes to unlock and then when it does, it bounces back and forth between being unlocked and locked. This will happens without ever touching the hold switch. Has this happened to anyone else?
    eMac   Mac OS X (10.3.9)  

    I am also having this problem. When trying to reboot, I get an endless cycle of the BIOS screen, then "MACHINE ERROR", then back. Running the same dmesg command as snoxu results in a similar error message. I am forced to shutdown by holding the power button. Upon rebooting, I get an error message that all extensions have been turned off (using Gnome Shell). Then I have to logout and login.
    Shutting down and then restarting works fine.
    Additional info:
    System76 Gazelle Professional laptop
    syslinux, systemd, GDM, Gnome Shell

  • Reboot hangs and takes several minutes to reboot

    Hello fellow archers I have a Vaio laptop and my system started to hang and takes several minutes to reboot.
    I have no real clue as to why since poweroff works fine and reboot used to work fine.
    I did a system update. And more recently migrated to systemd, may not be related
    edit: I found a workaround. Adding the following to my grub kernel line
    reboot=pci
    But it does not reboot quite the same way, meaning the power led no longer goes off and back on.
    Still haven't quite figured out why I can no longer reboot normally without this workaround.
    Last edited by snoxu (2012-10-18 18:16:18)

    I am also having this problem. When trying to reboot, I get an endless cycle of the BIOS screen, then "MACHINE ERROR", then back. Running the same dmesg command as snoxu results in a similar error message. I am forced to shutdown by holding the power button. Upon rebooting, I get an error message that all extensions have been turned off (using Gnome Shell). Then I have to logout and login.
    Shutting down and then restarting works fine.
    Additional info:
    System76 Gazelle Professional laptop
    syslinux, systemd, GDM, Gnome Shell

Maybe you are looking for

  • Album Artist...Broken

    This isn't a question per se, and I'm not looking for any responses. I just want Apple iTunes + iPod developers to know that the Album Artist criteria for songs in iTunes messes with the ordering of the songs on the iPod (but not in iTunes). For exam

  • Errror while deploying ESS Business Package.

    Hi,    I'am deploying ESS SP11 Business Package and while deploying it in SDM it is giving me an error in the intial stage,when i press Start Deploymet option it is giving the error <b>"None of the available containers recognized the components of ap

  • I can't get Time Machine to recognize my external hard drive.

    I bought a new hard drive when we moved last September and it backed up my files once or twice.  Now I cannot get Time Machine to recognize it at all. I have tried to format it with Disc Utility and only get an error message:  Error: Unable to unmoun

  • Vendor Payment Advice

    Dear Sir, Plesae tell t code for print vendor payment advice. Thank & Regards Pawan

  • Lost beats audio

    Have an HP Pavilion dv6 running Win 7.  Was listening to Pandora in Firefox  -   went to Beats Audio to adjust sound.  On the Volume screen, I clicked on the white box at lower right of the third speaker volume control.  Sound stopped and I can't get