Re: drawing area to image file ???
- From: "beer" <b4205267 ku ac th>
- To: <gtk-list gnome org>
- Subject: Re: drawing area to image file ???
- Date: Fri, 22 Nov 2002 19:23:32 +0700
> 42052670 wrote:
>
> > Can I save or snap my Drawing Area into image file such as JPG, GIF?
> >
>
> /* VERY SIMPLIFIED and UNTESTED example */
> static void save_2_jpeg(GtkWidget *area)
> {
> GdkPixbuf *pixbuf;
>
> pixbuf = gdk_pixbuf_get_from_drawable(
> NULL,
> area->window,
> gtk_widget_get_colormap(area),
> 0,0,
> 0,0,
> -1,-1
> ); /* getting pixbuf */
>
> gdk_pixbuf_save(pixbuf, "drawingarea.jpeg", "jpeg", NULL); /*
> saving pixbuf to jpeg */
>
> g_object_unref(pixbuf); /* freeing pixbuf */
> }
>
> /* Olexiy */
>
>
I can't use function "gdk_pixbuf_save".
Is it in Gtk+2??
then I try to install Gtk+2.
I can ./configure ; make ;make install
but when I use "gtk-config --version"
it return version "1.2.10"
How can I install Gtk2.0?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]