[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03956] Tk PhotoImage options

From: andy@... (Andrew Hunt)
Date: 2000-07-13 02:46:46 UTC
List: ruby-talk #3956
Hi all,

I'm trying to write a simple Ruby/Tk app that displays a GIF file
using TkPhotoImage.  The GIF needs to be scaled down to a particular
size, as a "thumbnail."

The Tk doc says TkPhotoImage->copy can take an option of 'shrink', 'subsample', 
'to' and 'from' and yet *none* of these seem to work with Ruby/Tk.

Given:

		new_img = TkPhotoImage.new('file'=> filename)
		image_widget.copy(new_img, 'subsample' => "8 8")

I get the error message:

  	tk.rb:548: in '_invoke': unrecognized option "-subsample 8 8 ": 
  	must be -from, -shrink, -subsample, -to, or -zoom

I've tried "8,8", "8", nil, '', and a few other combos, but it just
doesn't seem to like it.

Any hints?

Thanks...

/\ndy


--
Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development
web:   http://www.pragmaticprogrammer.com   email: andy@pragmaticprogrammer.com
--
Our New Book: "The Pragmatic Programmer" Published by Addison-Wesley Oct 1999
              (see www.pragmaticprogrammer.com/ppbook)
--

In This Thread

Prev Next