Hello Ben,
I don't think that OpenMap supports animated GIFs directly. On the other
hand you could check out
http://www.permadi.com/tutorial/javaImgObserverAndAnimGif/ to see if it
helps.
I don't know if this helps you or not but I have an ImageInverter class:
import java.awt.*;
import java.awt.image.*;
import java.awt.image.renderable.*;
import javax.media.jai.*;
public class ImageInverter {
private ImageInverter() {}
/** inverts an image
* @param image image to invert
* @return the inverted image.
*/
public static Image invert(Image image) {
// convert the image into a buffered Image.
BufferedImage image = new BufferedImage(image.getWidth(null),
image.getHeight(null),
BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();
g.drawImage(image, 0, 0, null);
g.dispose();
// invert it.
ParameterBlock pb = new ParameterBlock();
pb.addSource(image);
return JAI.create("invert", pb).getAsBufferedImage();
}
}
I use it to flash an image when it is selected by inverting it over and
over. It works like an XOR operation in that inverting the inverted image
gets you your original back again. I have this hooked to a Timer that
inverts the selected image every second. You could arrange your timer and
the image so that the repeated inversion give the visual illusion of
spinning.
You might be able to use this scheme to make a whole county flashing red
on and off by making an TYPE_INT_ARGB and playing with the transparency
colour.
Hope that helps.
regards,
Adrian
_____________________________________________
Dr. Adrian Lumsden
Product Specialist
Scientific Software and Systems Limited
Tel: +64 4 917-6680 (direct)
+64 4 917-6670 (reception)
Fax: +64 4 917-6671
E-mail: Adrian.Lumsden@dth2spm.sss.co.nz
Visit us on the Web at: http://www.sss.co.nz
_____________________________________________
This e-mail passed SSS's content security scan.
It is covered by the confidentiality clauses at
http://www.sss.co.nz/content_and_confidentiality
Ben Podoll <benjamin.podoll@und.edu>
Sent by: owner-openmap-users@bbn.com
16/06/04 14:13
To: openmap-users@bbn.com
cc: 'OpenMap Support' <openmap@bbn.com>
Subject: [OpenMap Users] gif animation / flashing area
Is there a way to put a gif or some small animation on the layer without
having to redraw the layer?
For instance if I wanted to plot a tornado on the map and use the
"ying-yang" symbol as a graphic but have it twirling to denote rotation
how could I do that? I would think a gif would be the easiest if OpenMap
supports that?
The other issue is that if I wanted to have an area (like a county)
flashing red, on and off, to denote a warning how could I model that with
OpenMap?
Those are two questions I have been unable to find answers for, does
anyone have any suggestions?
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Jun 15 22:48:30 2004
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT