Re: image resizing
- From: "John (J5) Palmieri" <johnp martianrock com>
- To: ritwik kumar <linux4ritwik yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: image resizing
- Date: 11 Jul 2003 23:40:21 -0400
On Fri, 2003-07-11 at 23:13, ritwik kumar wrote:
hey,
how do i scale images to my desired size and then
display using GtkImage widget? othetwise on part of
the image shows when window is smaller than the image.
Please help.
GdkPixbuf pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
width,
height,
GDK_INTERP_BILINEAR);
GtkImage image = gtk_image_new_from_pixbuf (scaled_pixbuf);
Hope this helps
--
J5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]