Multiples layered images & performances

From: Tristan (tmarly_at_free.fr)
Date: 11/27/04


Date: 27 Nov 2004 08:11:27 -0800

Hi,

I have to draw many images (can be some hundreds, of every sizes).
These images can be overlapping each other. Moreover, the user must be
able to pick whatever image and move it.

I was wondering what is the solution for the best performances.

The solution to paint all images on the same panel through the paint()
method of a JPanel is of course a bad solution because each time the
window is resized or displayed, all pictures are drawed again.

There is the possibility to draw all images on an offscreen buffer.
However, I am not sure this is a good solution, because there is the
problem of picking one picture and to move it wherever the user wants.
There is also the problem that all pictures need to be redrawed when
one of the picture is moved.

I was wondering if the usage of one JLayeredPane by picture would
optimize the performances ?

Tristan



Relevant Pages

  • Re: How can I hyperlink to an enlarged picture in Publisher 2003?
    ... I was referencing the way you produce your html ... One of the places where Publisher starts to feel its limits is when the ... When you resize and optimize your images, ... Picture> Size tab). ...
    (microsoft.public.publisher.webdesign)
  • Re: Newbie question - blurry images
    ... Photoshop (only having used "packages" like MS Paint before!) and I don't ... compression would cause an image to blur, so I would always save my images ... Blurryness has more to do with the camera lens and camera shake than the ... 'loss-less' files - nothing is ever 'lost' if you adjust the picture. ...
    (alt.graphics.photoshop)
  • Re: How do I create mouse overs for web documents?
    ... I did tweak the sky and the picture is a LITTLE bit clearer. ... Many thanks David. ... > you can see that you have added the alt tags to your images as they load ... and to get the alt tags to work in Pub 2003 requires ...
    (microsoft.public.publisher.webdesign)
  • Re: How to hide jpg
    ... To create your single large data file you could write a VB app to Open a new file for Binary and use Put to write an array of 101 Longs into the file. ... This will enable you to store one Long value and 50 "pairs of Longs" with the first Long containing the number of images the file contains and each "pair of Longs" thereafter specifying an "offset from the beginning" in LongA and the image data length in LongB. ... Then you can use that single data file in your own main VB program by writing code to extract the "number of images in the file" and then "look at" each appropriate pair of Longs in turn and "Get" data of the appropriate size and starting at the appropriate point into a Picture Box or StdPicture object or whatever. ... Private Declare Function GlobalAlloc Lib "kernel32" _ ...
    (comp.lang.basic.visual.misc)
  • Re: method to reveal photoshop manipulations
    ... cyclist was part of both images; the question is which of the two images was ... The white van (and it's associated shadows, ... two pictures is the original and which is the modified picture. ... But the exif data and the content of the image can both be edited ...
    (rec.photo.digital)