I’ve implemented a new format option for the WMS Animator named
gif_disposal_method. Through this option it can be specified what to do with
the previous GIF frame once a new frame is displayed. Valid values are none,
doNotDispose, restoreToBackgroundColor and restoreToPrevious. The default value
is none. Before, this disposal method (none) was set statically for animated
gifs. Using this method, gif animations don’t hide their previous frames. In
other words, new frames were just rendered on top of the previous frames. With
the newly added gif_disposal_method option, for example it is possible to hide
all previous frames by changing the disposal method to restoreToBackgroundColor
.
All four valid option values are also listed and described in the GIF
specification (23. C IV Disposal Method).
The option gif_disposal_method can be used like the other two format options
parameter gif_loop_continuously and gif_frames_delay.
Example usage:
http://localhost:8080/geoserver/wms/animate?layers=topp:states,sf:restricted&format=image/gif;subtype=animated&aparam=bbox
&avalues=-180\,-90\,180\,90,-125\,25\,-67\,50&format_options=gif_loop_continuosly:true;gif_disposal_method:restoreToBackgroundColor
&width=640
For the implementation it was required to add and change some lines in the
following files:
• src/wms/src/main/java/org/geoserver/wms/WMS.java
• src/wms/src/main/java/org/geoserver/wms/map/GIFMapResponse.java
I’ve also added a drop down box where the default disposal method can be set to
the WMS admin page of the Geoserver.
Do you think we can implement this new feature into the GeoServer stable
version?
Regards
Maurizio La Mela
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel