summaryrefslogtreecommitdiffstats
path: root/ds9/library/movie.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-02-15 22:06:18 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-02-15 22:06:18 (GMT)
commit4117168e0b406edb606b6ddb4fdb6640786c9479 (patch)
treef53c119b109450393d754ab7874ef96bcf25be46 /ds9/library/movie.tcl
parent89aa9972e381c2853ff075e592e03cacc4a4e663 (diff)
downloadblt-4117168e0b406edb606b6ddb4fdb6640786c9479.zip
blt-4117168e0b406edb606b6ddb4fdb6640786c9479.tar.gz
blt-4117168e0b406edb606b6ddb4fdb6640786c9479.tar.bz2
support animated gif
Diffstat (limited to 'ds9/library/movie.tcl')
-rw-r--r--ds9/library/movie.tcl13
1 files changed, 10 insertions, 3 deletions
diff --git a/ds9/library/movie.tcl b/ds9/library/movie.tcl
index f06ed42..5ded1b2 100644
--- a/ds9/library/movie.tcl
+++ b/ds9/library/movie.tcl
@@ -347,13 +347,20 @@ proc MoviePhotoGIF {} {
proc MoviePhotoGIFClose {} {
global movie
- set ch [open $movie(fn) w]
- fconfigure $ch -encoding binary -translation binary
+ set ph [lindex $movie(gif) 0]
+ set ww [image width $ph]
+ set hh [image height $ph]
+ agif create "$movie(fn)" $ww $hh
+ foreach ph $movie(gif) {
+ agif color $ph
+ }
- close $ch
foreach ph $movie(gif) {
+ agif add $ph
image delete $ph
}
+
+ agif close
}
proc Movie3dDialog {} {