Solved

Efficient way to create images

Posted on 2002-07-05
7
195 Views
Last Modified: 2010-03-31
Hi,

I'm making a Java applet that is used for image viewing. When the user clicks on the applet, the next image (in a jar-file) is displayed. Since I want to reduce download times. On some images the difference from the previous image is small and I have created an application that scans the images and only publishes the changes from the previous image.
In the paint routine, (lets say for picture 5), I paint Image1, Image2 etc.
It's obvious that when you are at the end of a long sequence, the painting of the next image takes forewer. Anyone that has any suggestions on how to quicly assemble the images. (Note it must also be possible to go backwards in the applet.)
0
Comment
Question by:terjeg
7 Comments
 
LVL 16

Accepted Solution

by:
heyhey_ earned 300 total points
ID: 7132087
you can render all "passed" images inside offscreen image - and inside your paint() method, you will have to render only one image (the offscreen one).
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 7132093
to create ofscreen Image use

Image offScreenImage = createImage(500, 500);

to render inside it
offScreenImage.getGraphics().drawImage(image1, 0, 0, null);
0
 
LVL 92

Expert Comment

by:objects
ID: 7133067
> the next image (in a jar-file) is displayed.
> Since I want to reduce download times

Are all these images in the one jar file or in seperate jars?
If they are all in one then they'll all be downloaded in one and available on the client so their won't be any download delay between images.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Expert Comment

by:yasser_helmy
ID: 7134849
You have to download the images. However, when the jar file is downloaded, all the images packed inside it are also downloaded. So showing the first images takes time to download, but all other images in the jar dont download. Even if the images are packed inside multiple jars, you will spend time downloading the jars once and then you dont have to spend more time viewibg images.
You need to download the jars when loading the applet so you dont get delays between images.
I hope this helps.
0
 
LVL 35

Expert Comment

by:girionis
ID: 8894024
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to heyhey_

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0
 
LVL 92

Expert Comment

by:objects
ID: 8897937
including the images in the jar seems a lot simpler :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question