[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: drawing an RGB bitmap or pixbuf
- From: "Andrew J. Montalenti" <ajm pixelmonkey org>
- To: Matt Hull <mhull1 uic edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: drawing an RGB bitmap or pixbuf
- Date: Tue, 13 Dec 2005 12:01:06 -0500
Dear Matt,
See gtk_image_set_from_pixbuf() and GdkPixbuf if you want to load the
bitmap from a file.
See gtk_image_set_from_pixmap() and gdk_draw_rgb_image() if you want to
get the image data from some RGB buffer. You also need to create a
pixmap with gdk_pixmap_new(). GdkPixmaps are GdkDrawables, and so a
pixmap may be passed to gdk_draw_rgb_image() with the GDK_DRAWABLE()
cast.
Make sure to read the docs for the above functions. They are spread
around:
gtk_image_*: GTK+ docs (under GtkImage)
gdk_draw_rgb_image: GDK docs (under GdkRGB)
gdk_pixbuf_*: gdk-pixbuf docs
gdk_pixmap_*: GDK docs (under "Bitmaps and Pixmaps")
-Andrew
On Mon, 2005-12-12 at 17:06 -0600, Matt Hull wrote:
> I am new to gtk and trying to draw a bitmap to the screen. the bitmap is
> about 200 by 300 pixels with 8 bit rgb, total is 24 bits. alpha is
> optional at the moment. for now it is 0xff. i have tried many different
> examples from the internet but none seem to work. can anyone give me an
> example ? maybe just draw it once to get me started or put it in a timer
> loop to be called when idle ?
>
> thanks, matt
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]