5 file = File.join(File.dirname(File.expand_path(__FILE__)),
6 'images', 'sample.gif')
8 src = TkPhotoImage.new(:file=>file)
10 fail RuntimeError, 'no image file'
16 TkOption.add('*Label.font', '*helvetica*10*')
17 TkOption.add('*Label.background', 'white')
19 l_img0 = TkLabel.new(:image=>src)
20 l_hdr0 = TkLabel.new(:text=>"#{width} x #{height}")
21 l_ftr0 = TkLabel.new(:text=>'100%')
22 Tk.root.background('white')
28 dst = TkPhotoImage.new(:width=>iw, :height=>ih)
29 Tk::BLT::Winop.image_resample(src, dst, :sinc)
30 l_hdr = TkLabel.new(:text=>"#{iw} x #{ih}")
31 l_ftr = TkLabel.new(:text=>"#{r}%")
32 l_img = TkLabel.new(:image=>dst)
33 Tk::BLT::Table.add(Tk.root,