diff options
Diffstat (limited to 'ds9/library/rgbimage.tcl')
-rw-r--r-- | ds9/library/rgbimage.tcl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ds9/library/rgbimage.tcl b/ds9/library/rgbimage.tcl index 460b556..d740985 100644 --- a/ds9/library/rgbimage.tcl +++ b/ds9/library/rgbimage.tcl @@ -82,7 +82,13 @@ proc LoadRGBImageSocket {sock fn} { proc SaveRGBImageFile {fn} { global current - if {$fn == {} || $current(frame) == {}} { + if {$fn == {}} { + return + } + if {$current(frame) == {}} { + return + } + if {![$current(frame) has fits]} { return } @@ -95,10 +101,6 @@ proc SaveRGBImageFile {fn} { rgb {} } - if {![$current(frame) has fits]} { - return - } - $current(frame) save fits rgb image file "\{$fn\}" } @@ -108,6 +110,9 @@ proc SaveRGBImageSocket {sock} { if {$current(frame) == {}} { return } + if {![$current(frame) has fits]} { + return + } switch -- [$current(frame) get type] { base - @@ -118,10 +123,6 @@ proc SaveRGBImageSocket {sock} { rgb {} } - if {![$current(frame) has fits]} { - return - } - $current(frame) save fits rgb image socket $sock } |