Changeset 1638 for trunk/gui


Ignore:
Timestamp:
Jan 11, 2010 11:14:45 PM (14 years ago)
Author:
gah
Message:

fix for empty JPEG image error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/nanovisviewer.tcl

    r1636 r1638  
    558558            # to the BLT picture image it won't be necessary to decode the
    559559            # image data.
    560             set bytes [$_image(plot) data -format "jpeg -quality 100"]
    561             set bytes [Rappture::encoding::decode -as b64 $bytes]
    562             return [list .jpg $bytes]
     560            if { [image width $_image(plot)] > 0 &&
     561                 [image height $_image(plot)] > 0 } {
     562                set bytes [$_image(plot) data -format "jpeg -quality 100"]
     563                set bytes [Rappture::encoding::decode -as b64 $bytes]
     564                return [list .jpg $bytes]
     565            }
     566            return ""
    563567        }
    564568        default {
Note: See TracChangeset for help on using the changeset viewer.