Link to home
Start Free TrialLog in
Avatar of pogs
pogs

asked on

image loading

how can i make my image loading smoother and faster. And also how can i make sure that it would be loaded.
Avatar of Sasha_Mapa
Sasha_Mapa

How is this different from what I proposed? What is "smooth loading" exactly?
ASKER CERTIFIED SOLUTION
Avatar of Sasha_Mapa
Sasha_Mapa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
u ca use media tracker for smooth loading aswell as for making sure that image gets loaded
eg.
import java.applet.*;
import java.awt.*;
public class Image extends Applet
{
  private Image img;
  private MediaTracker mt;
  public void init()
{
  img  = getImage(getDocumentBase(),"imagename");
  mt = new MediaTracker(this);
  mt.addImage(img);
//other code
}
}

this is sample code for smooth startup of imageloading
RJackman
How is this different from what I proposed? What is "smooth loading" exactly?
I don't know what type of files your using, but if your using a gif image, then a jpg can be much smaller (therefore faster) if the jpg quality settings are very low. However if you have a high definition jpg image, you would have a smaller picture if you used a gif.
Avatar of pogs

ASKER

thanks guys ...I think I have proposed 50 points for it. Anyway, I actually want to use this idea for loading an image from a browser to the application that I have created (for example use it as an icon for my button). Thanks again.

"ingats...." in our language "take care".