Re: resizing a Gtk2::Image



Gavin Brown said:

Is there a method of Gtk2::Image objects that can resize/rescale/resample
an image?

nope.

GtkImage is just a widget that displays images.

the image it displays can be a GdkPixmap or a GdkPixbuf, and it's *that* image
that you want to resize/rescale/resample.  there's a rather full-featured API
for scaling GdkPixbufs (Gtk2::Gdk::Pixbuf in perl).

by default the GtkImage tracks the size of its source image, but i imagine
that if you really really need to you could call set_size_request (widget
method) on the GtkImage --- although i don't actually know what would happen.



-- 
muppet <scott at asofyet dot org>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]