[Gtk-sharp-list] Image resize on image widget control

dkarantonis dkarantonis at soft4real.com
Tue Dec 15 03:37:55 EST 2009

i would like to ask how i could resize an image from the project resources
inside an image widget control.

What i am doing for the moment is loading the image and try to resize it by
assigning hard coded width and height values, but the image does not render
with the specified width and height but with its original values.

//create image from resource
Image img = new Image (myAssembly, "resourceImageId");

//resize image
img.WidthRequest = 50;
img.HeightRequest = 150;

//assign image to image widget
imgControl.PixBuf = img.PixBuf();

Any ideas?

thanks in advance
View this message in context: http://old.nabble.com/Image-resize-on-image-widget-control-tp26791414p26791414.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list