Solved

Efficient way to create images

Posted on 2002-07-05
7
179 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now