I am trying to resize an image in Val.
So I read Waldak and finished writing this code
var img = new Gtk.Image.from_file ("fire.png"); Var pix_buf = img.get_pixbuf (); Pix_buf.scale_simple (50, 50, Interpict. BIIINAR); Window.add (IMG);
But it has no effect.
If there is a way to dynamically scale an image so that it fills its container, it will be awesome, but it will be scaling properly.
does not modify the image. It returns a new pixbuf
that is scaled up. Use to create a new image and add it to your window.
No comments:
Post a Comment