Loading large images

Hi there,
I'm facing lot of problem while loading large image (25+ MB JPG/TIFF) in editor pane using ImageIO. I always get OuofMemory exception or my machine (p4 2.4ghz/512 ddr) get hangs. Is there any way to load large images within a moment in Java? I have seen one s/w (written in vc++) that do the same. I'm trying to replicate that s/w.
Is there any 3rd party Java API to do the same? Have you guys develop similar s/w before?
I've tried many ways: by changing heap size, using ImageMagick, spliting the image, etc. but never get satisfactory results.
Any help would be appreciated.
Thanks in advance.
-tamal

You can use Java Advanced Image
http://java.sun.com/products/java-media/jai/downloads/download-1_1_2.html
this will avoid the out of memory error.
I use it to read and show 20K*20K pixel images.
the loading is immadiate.
If you use javax.media.jai.widget.ScrollingImagePanel (deprecated) class to visulize the image is quite quick.
Obviouse that if you want to visualize the entire image you will need to wait an approprite time for rescaling it.

Similar Messages

  • Safari 7.1 won't load large images on MacBook Air. Turning off Auto Graphics is not an option.

    When I try to load a large image with Safari 7.1, I get a black box instead of an image.
    Chrome and Firefox load the image just fine.
    This is a known problem and others have resolved it by turning off Auto Graphics Switching.
    However, my version of MacBook does not have the capability to turn off Auto Graphics Switching under the Energy Saver preferences. (I guess I have the GPU or chip or whatever that doesn't provide that option.)
    Are there any workarounds?
    Here are two threads about the same problem, but the solutions don't work for me:
    safari 7 won´t load large images...
    Safari 7.0.1 does not load large images

    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    "Develop" menu will appear in the Safari menu bar
    Enable Images.
    Make sure that"Disable Images" is not enabled.
    Best.

  • Can't load large image (png)

    I have a sandbox web page with large image (png file 26000x13000, 14MB packed/330MB unpacked). I can open it in IE but firefox display page without image. I have 1,2GB of free RAM, how can I adjust settings to make allow firefox display the image? Currently there is no difference if I use unpacked BMP, it doesn't work as well. I would prefer to stay with PNG since it's only 14MB on disk.

    Is there an error message?
    We've been able to load more than 100MB files.
    Try setting SQLNET.EXPIRE_TIMEOUT=0 in the sqlnet.ora file
    Fenella

  • Safari 7.0.1 does not load large images

    When I use safari and try to load an image with a resolution above, say, 2000x2000, I get a black box, sometimes with a grey area in the corner. The correct image displays for a brief moment, about a half second, but not enough for my viewing pleasure. This usually happens when I click imgur links on reddit, such as this one. I just searched a very large image on google, and was able to load it no problem. I've tried turning off all extensions, but even with no extensions the images do not load. Any advice is much appreciated. Thank you!

    Turning auto graphics off solved the issue for me: http://www.youtube.com/watch?v=QxSlQ-GNbik
    Seems like Safari won´t render large images when you are using integrated grapchis.

  • Load Large Image

    Hi.
    I have jpg image with 6.5Mb, 6000px*4500px.
    I load the picture to "Image" control with the same
    size(6000*4500) and the "Image" control is in the "Panel" control
    in order to enable "Scrollbar" so user can navigate picture.
    However, when user browses flash file, memory increases 150MB.!!!!
    Is there any solution dor issue: huge picture with scrollbar
    for navigate?
    Thanks for any read and reply.
    MA.

    The Flash Player has an image limit size of 2880 x 2880
    pixels, so your image is way too large to show up. Strange things
    will happen to it.
    I encourage you to file an enhancement request to let the
    Flash Player team know that you need the Flash Player to accomodate
    large images.
    Adobe
    Feature Request and Bug Report Form

  • Loader won't load large images

    I have some pretty large PNG images stored in a database (example 1000x15000 px, 4.5MB). I am trying to load this using the Loader class...the problem I am having is when I call load(), nothing happens. No events, no errors.
    I can take the same image and embed it. As long as as I set the height to less than 8000px it works fine. If I convert the same image to a ByteArray, and try to load that byte array nothing happens.
    Any suggestions?
    Thanks

    Hmm, so at this point I am just trying to load the image into memory and not display it. I don't really need to display it at full size. Are you saying that I can't even load the image at all?
    I haven't tried stitching. It seems like a lot of effort and I was hoping I wouldn't have to do that. Additionally, the data is already stored as a single PNG file in the database so I don't know how I am going to break it up. I was hoping since I can display the embedded image at 8000px high I could do the same thing with the ByteArray.
    Flash isn't even throwing an error so I can't even tell the user why the image isn't loading. Since the Loader won't load it I can't determine the image height.

  • Loading larger image when dropped

    Hey.  I am working on this image scroller, where thumbnails of images are displayed.  I get each image by
    function urlLoaded(event:Event):void {
         urlLoader.removeEventListener(Event.COMPLETE,urlLoaded);
         xml=XML(event.target.data);
         xmlList=xml.children();
         for (var i:int=0; i<xmlList.length(); i++) {
              var thumb:Thumbnail=new Thumbnail(xmlList[i].url);
              arrayThumb.push(thumb);
              arrayThumb[i].y=150.5;
              arrayThumb[i].x=i*110+280;
              photoContainer.addChild(thumb);
              arrayThumb[i].addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
              arrayThumb[i].addEventListener(MouseEvent.MOUSE_UP, dropIt);
    And I pick up and drop the thumbnail image by
    function pickUp(event:MouseEvent):void {
         getPosition(event.target);
         stage.addChild(event.target as DisplayObject);
         Sprite(event.target).startDrag(true);
    function dropIt(event:MouseEvent):void {
         Sprite(event.target).stopDrag();
         if (event.target.hitTestObject(getChildByName("movie"))) {
              var my_loader:Loader = new Loader();
              my_loader.load(new URLRequest("pics/1.png"));
              movie.addChild(my_loader);
              this.photoContainer.addChild(event.target as DisplayObject);
              event.target.x=xPos;
              event.target.y=yPos;
         } else {
              this.photoContainer.addChild(event.target as DisplayObject);
              event.target.x=xPos;
              event.target.y=yPos;
    Now this is perfect, because If the image is not dropped into the movie clip called "movie", it will be placed back into the scroller at its correct position.  I just have a coupld of issues currently.  I dont want pics/1.png to be displayed on each drop, this was used for a test.  What I need is for each image' big image to be displayed, which all have the same name as the smaller image, just in a different folder.  The images are in the xml file like
    <image>
          <url>pics/img_1.png</url>
      </image>
    So is there anyway I could use any of the above code to load the big image associated with the small image?  If event.target points to the current thumbnail being picked up, could i do something like event.target.url to point to its name or something?
    Any advise appreciated

    You should be able to store the image file name as a variable of the thumbnail and then use it when it comes time to load the image, such as in...
    my_loader.load(new URLRequest("pics/"+event.target.variable));

  • Safari does not load large images

    Images like on http://imgur.com/a/ZKhFa#zV5Hq9q do not load properly.
    The load halfway, and when they become a certain size, they do not load anymore.
    I have noticed this since OS X Mavericks.
    Firefox and Chrome load these images properly.

    Might be a Safari extension or third party plug-in preventing the images from loading properly.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.

  • Large images --java.lang.OutOfMemoryError browser

    Hello,
    i am loading a tif file of 174MB into an signed applet.Problem is its not loading very large images in browser,but works fine in appletviewer(1 min) bcus(if i am correct) appletviewer use more JVM memory and i think browsers JVM use 16mb(whihc is not sufficient for loading large images) ,but i increased memory,still its not loading.Anybody has any solution for this,please help me
    thanks
    hithesh

    Hi Everyone.
    i forced my java console which is used by both IE and NN to use 256m
    like -Xmx256m.now its loading large images of 175MB.
    but any of u guys know how to force it in applet code,so that user who is using my applet doesnt have to bother about doing it?
    thanks
    Hithesh Gazzala

  • How to load a large image for display on the Palm PDA

    Hello:
    I have a large image I would like to display on LV for Palm PDA. The documentation states there should be a 64K chunk limitation for VIs to compile on the Palm. Therefore, I decided to break this image up into 2D arrays of less than 64K per subVI. My 3.2 Meg image therefore has about 224 2D array subVIs. My motivation is to somehow use the build array function (with concatenate inputs) to reconstruct the image at runtime. I can compile each 2D array subVI as a test, but my attempt to reassemble and compile is futile. When I try to use the build array with only 8 of these subVIs in a top level VI the compiler complains its still too big of a VI. Using get info, memory for this top level states total ~2
    3K of memory usage.
    So can someone help me with this problem. Is there another way to load this size of an image into memory so I can display it on a picture control?
    BTW, this can build on LV for PocketPC.
    Thank you
    Robert

    Hi Robert,
    You are correct in that one of the limitations of the Palm OS is that files cannot be larger than 64 KB in size (as stated on page 5-3 of the LabVIEW PDA Module User Manual). The suggested workaround is indeed to have a top-level PDA VI that calls subVIs, and this top-level VI can then have a total file size larger than 64 KB.
    My suspicion is that with the picture control on the Palm OS, even if you are breaking up the image into smaller subVIs, the process of building the array to reassemble the picture is still forcing the Palm to allocate memory for each of those 2D array subVIs to place on the top-level VI's picture control
    and thus causing the Palm to complain about not having enough memory. The LabVIEW PDA User Manual also states that "There is a total limit of 64 KB on all front panel array data". Thus, when you are trying to use the build array on the top-level VI, the 64 KB limit on front panel array data is still being exceeded -- even with only 8 of these subVIs.
    The following KnowledgeBase article KB 38EJRHFQ: How Do I Put a Picture or Image on My LabVIEW PDA for Palm Front Panel? states that as a workaround, you can shrink the size of your image by using 4-bit or 1-bit data instead of the standard 8-bit pixmap representation.
    This is really just a limitation of the Palm OS and the fact that there is simply no way of displaying that much front panel information for your picture. Either way, you would need to build up the array of pixels for your bitmap, and for a 3.2 MB image, I don
    't believe there is any way for the Palm OS PDA to display the image in its entire at once.
    Sorry about that...
    Kileen C.
    National Instruments

  • Optimization on Load Time (Large Images and Sounds)

    Hi,
    I have an all flash website that works by having each portion of it to load and unload in the center of a frame based off the navigation chosen.  Load times on everything but one part of my site are ok.
    The dimensions of the part inside the frame are 968x674.  I know that's relatively large for a flash file, but that can't be changed at this point.
    Within the page there are objects that come up when you find an item on the screen.  Its a dialog box and it shows text, an image, and has a voice over that reads what the text says.  After you're done looking at it, there is an x-button to dismiss the window.  There are 15 of these and they are exported to the actionscript.  I add them in the actionscript via addChild.  I figured this is a huge spot that could be reconfigured, but I'm not sure if it would make much a difference.
    The other huge thing is there is a ton on the screen.  It starts you off in an environment, and when you click 3 different sections, it zooms into that portion allowing you to look for the items you're trying to find.
    There is also a man that talks and animates in the beginning and at the end.  We are planning on taking out the end part and putting a text box up.
    Here is the website..  its a propane safety site for kids.  I know its kind of a weird idea, but it works and people seem to like it.
    www.propanekids.com
    The two parts of the site we are trying to optimize is the main menu when you first are at the site, and the "Explore" section.  (Just click on the cloud on the front page.
    If someone could take the time to give me some new ideas of how I can get these loading times down, I would greatly appreciate it!
    Thanks

    Ok, who ever posted this message is hacking me  and i can't believe you guys are helping
    Date: Thu, 27 Jan 2011 11:07:28 -0700
    From: [email protected]
    To: [email protected]
    Subject: Optimization on Load Time (Large Images and Sounds)
    Hi,
    I have an all flash website that works by having each portion of it to load and unload in the center of a frame based off the navigation chosen.  Load times on everything but one part of my site are ok.
    The dimensions of the part inside the frame are 968x674.  I know that's relatively large for a flash file, but that can't be changed at this point.
    Within the page there are objects that come up when you find an item on the screen.  Its a dialog box and it shows text, an image, and has a voice over that reads what the text says.  After you're done looking at it, there is an x-button to dismiss the window.  There are 15 of these and they are exported to the actionscript.  I add them in the actionscript via addChild.  I figured this is a huge spot that could be reconfigured, but I'm not sure if it would make much a difference.
    The other huge thing is there is a ton on the screen.  It starts you off in an environment, and when you click 3 different sections, it zooms into that portion allowing you to look for the items you're trying to find.
    There is also a man that talks and animates in the beginning and at the end.  We are planning on taking out the end part and putting a text box up.
    Here is the website..  its a propane safety site for kids.  I know its kind of a weird idea, but it works and people seem to like it.
    http://www.propanekids.com
    The two parts of the site we are trying to optimize is the main menu when you first are at the site, and the "Explore" section.  (Just click on the cloud on the front page.
    If someone could take the time to give me some new ideas of how I can get these loading times down, I would greatly appreciate it!
    Thanks
    >

  • Problem loading large DNG images with Camera RAW!

    Hello,
    When loading large DNGs with Camera RAW 4.4 (for example, DNG dimensions are 9984x6656) CS3 says "cannot open the image because this is not a right kind of a document". EXACTLY THE SAME file is loaded without a problem using Camera RAW 3.7 and 4.0 (did not test other versions). Have you specially prevented loading of large files? Wouldn't it be better to provide this as an option? It's a real disappointment - new version of plugin CANNOT do the thing that older versions CAN. (Simply using older version is not an option, as I need to load RAWs from new cameras, like Canon 450D).
    Dear Adobe, please correct this problem :)

    It might be wise to give some insight like how the DNG was created, by what version of what software, if ACR is hosted in Photoshop or Bridge... What platform you are using, how much RAM, memory allocation, etc.

  • Large image not loading

    I generate JPGs on my server and send them to clients on an intranet (using http://, not file://). Smaller images work just fine. Large images do not using Firefox, even when trying to view the images by themselves in a new tab. Those same images work perfectly fine in IE 8, Chome v22, and Safari 5.
    I tried the suggestions here to no avail:
    https://support.mozilla.org/en-US/kb/fix-problems-images-not-show?as=aaq
    Similar problem found here:
    https://support.mozilla.org/en-US/questions/795933?as=aaq
    Not sure which attribute might trigger the issues, but I know:
    - 901 x 27928 resolution 3.93 MB picture will load
    - 904 x 32767 resolution 4.77 MB picture won't load
    Looks like the image file is uncorrupted because I can click to view the image in FF, right-click to 'View image info', click 'Save As...' for the image, and save it to my desktop. Opens up just fine in Windows. Seems to be a bug in the way Firefox is attempting to display it...

    That image displays fine for me in Firefox on Linux, but I'm not seeing anything in a Windows Firefox version that runs under Wine.
    Even the Tools > Page Info > Media preview panel is blank there, but saving the image is possible.
    <br />
    <pre><nowiki>data:text/html,<img src='http://imageshack.us/a/img12/4543/visualizedp1776ddv27731.jpg'></nowiki></pre>

  • Slow scrolling after large image loaded

    Hi all,
    Im trying to load a large Jpeg image (11mb, 4096*4096) into a bufferedimage object and draw this on a scrollable panel. However, the load time and scrolling once it has loaded is very slow. Here is the code I use to load the image and draw it
    try {
    File f = new File(mapName_);
    map_ = ImageIO.read(f);
    } catch (Exception e) {}
    public void paintComponent(Graphics g){
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    if(map_ != null){
    g.drawImage(map_,0,0,this);
    Also, when I run the program I increase the heap size with the command "java -Xmx128M -jar imap.jar" to avoid out of memory errors.
    Any ideas on how to improve the loading time and scroll speed?
    Thanks

    I have a 9800pro, AMD XP3200 and 1gig pc3200.

  • Excessively Large image loading

    I have a program that is calling a large number of PNG files
    from a separate source folder. A few of these images are far too
    big (in excess of 200KB) and they refuse to load.
    If the image is under 200KB (roughly), the image loads into
    the imagebox. If it is higher than 200KB, the imagebox does
    nothing, however, clicking any image after that, including ones
    that do display, sends the file size too high and my back up
    picture (TooBig.png) is loaded instead. I have tried clearing the
    image loaded, but I can't seem to get it to stop loading the large
    images.

    I saved your image to e:/java/test/jpg and this code worked fine for me.import java.awt.Image;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.SwingUtilities;
    public class TestImageIO {
       void makeUI() {
          File file = new File("e:/java/test.jpg");
          Image thumb = null;
          try {
             thumb = ImageIO.read(file)
                   .getScaledInstance(128, 96, Image.SCALE_SMOOTH);
          } catch (IOException ex) {
             ex.printStackTrace();
          JLabel label = new JLabel(new ImageIcon(thumb));
          JFrame frame = new JFrame("TestImageIO");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(300, 300);
          frame.add(label);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
       public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
             public void run() {
                new TestImageIO().makeUI();
    }db

Maybe you are looking for

  • Asus eee 901 and wifi

    hi, i'm a total newbie when it comes to linux so i wanted to change this and install arch on my eee pc. i used all the guides on wiki but i still don't know how to install wifi. now i have arch installed with all the packages from core installation b

  • Please! help me with this wrong code, where is mistake

    please! help me with this wrong code, where is mistake? import java.util.Stack; public class KnightsTour { Vars locs[]; private int size, max=1, d=0, board[][]; public KnightsTour(int x,int y, int newSize)      size=newSize;      locs=new Vars[size*s

  • Upload and save an Excel file from a local machine to SAP

    I am looking for a transaction which allows me to upload an Excel file from a local machine to SAP and save this file (the users should be able to edit the file in SAP afterwards). Then I would like to open and read the data from the file with the he

  • ME_GUI_PO_CUST

    I have implemented the badi ME_GUI_PO_CUST  at header level of PO adding 2 custom fields , when i try to save the data it gives "NO DATA CHANGED" please advice

  • Macbook Pro, BootCamp, Windows XP and Creative Suite 2, Oh my!

    Okay so here goes. I might get a 15", 1 GB mem, 120 GB HD MacBook Pro. On it I will most probably install Windows XP and CS 2. Is this a good idea or should I give up hope now? Will I be able to install any other progams including the above mentioned