Image Loading Time

I have a very Image extensive program, and it is beginning to malfunction due to long loading times and code happening before the images actually appear, which does all kinds of strange things. Is there any line of code i can put anywhere to tell all of the images to load before any code happens? Or is there any way to load them before they're being loaded? Aaaaaaaaah! I'm very confused and at a dead end with this image loading stuff... Thanks for any help!

I use this code:
image = toolkit.getImage("yeh.jpg");
while(image.getWidth(this) == -1) {
     try {
          Thread.sleep(10);
     catch (Exception e) {System.out.println("error");}
}If the image hasn't loaded, image.getWidth will return -1, causing to app to sleep for 10 runs.
When the image has loaded, the app goes on to the next code...
hope that helps, sleep well
izy_t

Similar Messages

  • Long Image Loading Times From LR to CS6?

    Hello Folks,
    I seem to be experiencing very long image loading times when loading an image into CS6 from LR4.
    When I right click an image in LR4 and select edit-in CS6, CS6 immediately starts up, and loads. But after CS6 is fully up on my screen, I get
    a spinning ball first, then spinning white/grey circles, until my selected image appears within CS6.
    I am operatinng with an iMac 27 2.8G with 8G of memory and using SL 10.6.8 I have about 300G of free space on my HDD.
    Any ideas or suggestion or settings in CS6 I might need to look at would be appreciated.
    I never experienced this issue as I recall in CS5.
    Jim

    Curt,
    Thanks, yes I do have the latest version of Snow Leopard, which is 10.6,8 and it is updated with all of the latest updates in drivers.
    Jim

  • Can this html code be changed to speed up the image load time?

    I found some html that creates a auto running slide show. I've got three images (small image sizes) but it is slow to start up when the page is first opened. http://web.me.com/phelpssculpture/Site/test.html this is the escaped code:
    <center><img id='imageholder' src='' ></img></center>
    <script type='text/javascript'>
    images = new Array();
    images.push('http://web.me.com/phelpssculpture/Docs/typewriterprpage.jpg');
    images.push('http://web.me.com/phelpssculpture/Docs/royalprpage.jpg');
    images.push('http://web.me.com/phelpssculpture/Docs/Lovetest.jpg');
    var image_index = 0;
    function rotateImage() {
    if (image_index == images.length - 1) { image_index = 0 } else { image_index++ }
    document.getElementById('imageholder').src = images[image_index];
    setInterval('rotateImage()', 5000);
    </script>
    I have a page: http://web.me.com/phelpssculpture/Site/Resume.html
    that has a rollover image (from OldToad) that has two images about the same file size and located in the same folder on my iDisk as the other slide show images but it seems to load instantly.
    this is the escaped code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    loadImage1 = new Image();
    loadImage1.src="http://web.me.com/phelpssculpture/Docs/typewriterprpage.jpg";
    staticImage1 = new Image();
    staticImage1.src="http://web.me.com/phelpssculpture/Docs/royalprpage.jpg";
    // End -->
    </script>
    <a href="http://web.mac.com/phelpssculpture/Site/royal.html" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;">
    <img name="image1" src="http://web.me.com/phelpssculpture/Docs/royalprpage.jpg" border=0></a>
    Does anyone know if it's possible to improve the html of the slideshow snippet to speed up the initial load time?
    Thanks, David

    Ethmoid:
    There are seven different pages: http://web.me.com/phelpssculpture/Site/movieroyal_davidphelps.html
    Each link is directed to a different page.
    I created the basic layout on one page and then duplicated the page six times.
    the links are in one text box ( that's why they're lined up well ) and each individual word is activated as a link. I changed the background color of the forward tab to match the color of the main shape and used the send forward or send backward command to get the tabs to look right on each page.
    The only problem with the words being in a single text box is that explorer doesn't render the spacing correctly and they fall off their respective tabs. When I get time I will put each word in it's own text box ( it's not that hard to align them ) so it will render properly in explorer.
    Sincerely, David Phelps

  • Slow image load time in web browsers. My images load too slowly.

    Hi, My images are loading slowly in my site. They are png and all under 600kb. Should they be jpegs (they are photos) Can anyone advise?

    I would do a few tests, I think you might be fine with the High setting, but also try a little lower if you can to conserve load time. It would be good to get your files to around 120kb each.
    A .jpeg file is the way to go, as .png files tend to be 20-40% larger.
    Here is an image that is set to 730x486- saved as Medium - Quality 50 - jpeg - final size 99 kb

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

  • Any Way I Can Make My Page's Images Load One At a Time?

    Hi folks,
    I have a page with a stack of large images. It takes several seconds for them all to load, but I was wondering if there's any way I could dictate the order in which all of these images load? This way, the top image would load first, then the the next one down, and so on, leaving little perceivable page load time for visitors.
    It seems like this would be a common necessity for a web page, does anyone know an easy (because I know very little about this) way to do this?
    Thanks!

    One major problem, is that you have scaled the images in DW, and not in a graphics program.   I have your page open in the background and it's been a while loading and it's still not finished  :-)
    eg:  the following images has properties of:
    http://www.selfeffacingtheories.com/web-content/pictures/picpics/holes.jpg
    933px × 699px  but you have scaled it to:  615px × 458px
    Trying to put your page through the Web Optimiser - doesn't show a very good result - it couldn't be tested because it exceed the size requirement.
    http://www.websiteoptimization.com/services/analyze/
    The size of this web page (4264698 bytes) has exceeded the maximum size of 3000000 bytes.
    This is just way too big a file size and seriously needs to be optimised.  The only way to do this is to scale down the images in either Photoshop or Fireworks.
    Why not use a lightbox effect, where you show a much smaller size of the image and then when someone clicks on it they see a much larger version of the image:
    My small demo here: (using the Dreamweaver Lightbox Extension)
    http://dreamweaverresources.com/tutorials/dreamweaver-lightbox/

  • Dealing with a lot of images....Thinking about load time

    I am designing a web site that has roughly 30 unique images per page.  Each page has a photo gallery which swaps images in the main content area.  Also, there are some other miscellaneous graphics that are reused on each page.
    1) Should I create an images folder for each page or is there downside to having 200+ images in one folder? 
    2) Is there a way to see the size of a page (in mega bytes) and get a feel for the load time?
    Thanks!
    Gary

    If it were me, I would create a new folder for each of the pages that have your 30+ unique images - that way they are all organised by page,I find that if you ever need to change them they are filed in a logical way and easier to maintain.
    I would then have another folder containing all the images that will be used on all pages.  Like header, logo, background images etc.,
    Nancy has given you a link on how to best get a report on the file sizes used in your site.
    Nadia
    Adobe Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • 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
    >

  • Safari image loading two times ?

    Hi,
    I have a website that loads the contents for an ul tag throug an jquery ajax call every 10 seconds. In this chunk, I have an img tag.
    I see the image loading, then at the next load the image blinks one time, after that the image is ok, until I select another image. After selecting another image, it shows correctly, and upon next load it blinks one time.
    When I look in the Web Inspector - Resources, I see the ajax call being made followed by loading the image. The next time I see the ajax call again followed by loading the image again. From here on, I only see the ajax call every 10 seconds, and no image reloading.
    Can someone explain to me why the image is loaded twice ? Why is it not loaded and cached in one time ?
    I see this on iPod Touch, iPad, Safari Desktop.
    If this is a bug, does anyone know a work around to prevent the image to blink one time ?

    I have created a testcase
    http://www.maakmenietgek.com/test6
    Best is to open safari, open the webinspector in the resrouces, and then browse to this page.
    I should load with a red square, after 3 seconds it should load a green square, and 3 seconds after that you will see the blink. In webinspector you can see that the green image is reloaded.

  • Same image, loaded multiple times: speeding up load time?

    I wrote this message before thinking about embedding the
    image... I was thinking that putting a relative path automatically
    embedded the image, but in retrospect I was wrong, and that will
    probably solve my problem. I'll just leave the question here anyway
    though:
    I'm using image components in my application loaded from a
    relative path. The problem is, I have many copies (30+) of the same
    image, essentially 30+ identical image components which need to be
    loaded/unloaded at different intervals, and they are not loading
    fast enough for me. Would it be more effective to duplicate an
    existing "master" Image to improve load time instead of explicitly
    setting "image.source=" each time? Is there any better solution for
    improving image load speed?
    Best of all would be some way to pre-cache or buffer images,
    so that I can be guaranteed that they will load as quickly as
    possible when I bind them to an Image component.
    Cheers!

    JPGS are much better for photos.  PNGs are good when you need transparency.
    Instead of Image Swapping, why don't you use a photo gallery?
    FancyBox is nice..  It supports real text captions/descriptions, too.
    http://fancybox.net/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Issues with site load time. (bg images)

    Hey, guys.
    Having an issue with a site uploaded with MUSE. None of the images are overly large, but the load time is 5 to 6 seconds where it should be instant.
    Looking at it, it appears as though all of the images are attempting to load simotaneously in one large chunk rather than in a line.  Is there anyway to remedy this?

    This isn't related to background images. It's how Muse is handling the loading of the ~100 images in the slideshow. Thanks for pointing this out. Until we have altered the loading method for these images, the only workaround I have is to decrease the number of images in the slideshow.

  • Loading the same image multiple times

    I'm trying to dynamically load a single image multiple times
    into flash. Basically I want to end up with two movieclips mc1 and
    mc2 that contain the image. I'm currently using the Loader
    component (connected to the ProgressBar) to dynamically load the
    image. It works fine for loading the image once but I'm really not
    sure how to go about creating a second movie clip with the image.
    Here's my code for loading the first image:
    var mc1:MovieClip = new MovieClip();
    var listener:Object = new Object();
    listener.complete = function(eventObj:Object){
    nextFrame();
    imageLoader.addEventListener("complete", listener);
    mc1 = imageLoader.content;
    imageLoader.load(imgURL);
    But everything I've tried to load mc2 with that same image
    has failed. I've tried 'mc2 = imageLoader.content', 'mc2 = mc1',
    'attachMovie', 'duplicateMovieClip', calling imageLoader.load()
    twice on the imgURL, and creating a second Loader component and
    loading the image again. All of these methods have invariably
    failed. Most of them can load mc1 alright and sometimes mc2 even
    shows up on the stage but in the AS mc2 is always undefined.
    Can anybody point me in the right direction for loading
    multiple copies of the same image? It really shouldn't be that
    hard, should it?

    Well I figured out a solution. Turns out Flash doesn't allow
    you to duplicate dynamically loaded content like an image in a
    movieclip. But there is a little class called BitmapData that will
    do precisely what I was looking for. Here's the link I got this
    info from:
    http://www.senocular.com/flash/source.php?id=0.174

  • Burned DVD images only appear sharp near end of loaded time in screen

    Hi, I am new to the list. I have produced a slide show in iDVD with still photos, music and some video. Everything is fine except when I view the final presentation on my TV or with a DVD projector.
    The Problem:
    The images load and transition fine except they appear somewhat bitmapped or not sharp until just before the transition to the next slide then it sharpens. This happens with every image. It's as though the image is loading and then finally loads at the last half second to full resolution. Because of this the photos lack any detail until the very last second.
    Any help would be appreciated.

    Yup, and some transitions are worse than others. To avoid the problem you have two choices: 1. don't use any transitions in iDVD slideshows, or 2. (which is the best approach) create your slideshows in iPhoto or iMovie. (There are also third party photos to slideshow applications, but give iPhoto or iMovie a try first.)
    F Shippey

  • Iceland site - load times ok?

    Here is a site from our trip to Iceland. Are the image and movie load times ok?
    http://web.mac.com/volination/iWeb/
    Of course, any design suggestions welcome. Thanks.
    PB G4 1.67   Mac OS X (10.4.2)  

    Thanks.
    TomBud, I know the corners look bad on a few shots. Believe me, I was kicking myself when I looked at the video for not being more careful. I tried putting in a matte in the corners, like little triangle pieces, but I think it detracted from the video more than the blemishes.

  • Reducing Load Times / Design Architecture

    I'm designing a flash site with a Dynamic Gallery (loading images from a XML file). what can I do to reduce load time at the beginning, or limit loading times to individual images?
    I've seen designs which loads another SWF file on top of the current one. Is this feasible?
    Any details would be greatly appreciated.

    If loading the images is the goal of the file, then the quickest way to do that is to concentrate on the images.  Any way you load them, they have to be loaded.  Be sure they are optimized for the web.  If the gallery intent would allow for it, have the images loaded on request, using thumbnails or other button-like interfaces.  Or maybe load different sections at a time.  Or load so many at first, then load the rest in the background so that there's something to look at while the rest load.
    I don't know what purpose you have in mind for loading another swf into the file, so I can't offer any ideas there.

Maybe you are looking for

  • How do you install mountain lion on additional macs?

    How do you install Mountain Lion on additional Macs?

  • How many printed pages?

    I have an HP photosmart D110 and I seem to be going through a lot of ink.  I have it set to economy and we really don't print anything very detailed (homework, shopping list, etc).  I'm putting my 3rd cartridge in today and have printed less that 400

  • 10901 Data source name not found and no default driver specified(ODBC)"

    Dear all, I have installed BOE 4.0 at Win XP 64 bits, and also installed Sybase IQ 15.2 (32bit) ODBC, and has create the odbc entry "shkdemo" at the System Tab. However, I still got the above error when using the the "Interactive Analysis" thru "BI L

  • Changes in CC 5.2 over 5.1

    Hi all, i've been searching for documentation in terms of new/changed functionality in the Compliance Calibrator ver 5.2 over 5.1. I've already seen some new functions in 5.2. May I know where i could find the 'change log'? It does not seem available

  • Formatting Data

    Hi All How do i format numeric data being displayed? I need to display 2 decimal places ? Regards Lakshmi