Posted to tcl by ericlee at Fri Sep 17 05:23:34 GMT 2021view raw

  1. #!/usr/bin/env tclsh
  2.  
  3. package require Tk
  4.  
  5. set map [image create photo]
  6. $map read "a.png" -shrink
  7. label .img -image $map -anchor center -width 640 -height 480
  8. grid columnconfigure . 0 -weight 1
  9. grid rowconfigure . 0 -weight 1
  10. grid .img
  11.