Displaying image using Gdk/Gtk
- From: Chun Teck Soon <cwcsct yahoo co uk>
- To: gtk-list redhat com
- Subject: Displaying image using Gdk/Gtk
- Date: Thu, 15 Jul 1999 19:50:44 +0100 (BST)
Hi there,
I'm currently trying to write a program to display bitmap file using
gdk/gtk.
What I have tried so far is: after extracting the bitmap info header
and the pixel streams, I create a new GdkImage using 'gdk_image_new'
(the 'Visual' parameter required by 'gdk_image_new' was determined by
using 'gdk_visual_get_system'). Then I set the other attributes
(GdkImage.bpp, GdkImage.bpl and GdkImage.mem) manually as they r not
pass as parameters when creating the GdkImage. With that, I proceed to
create a GtkWidget with 'gtk_image_new' (passing the GdkImage as
parameter) and add it to a container for display. The result is a
window with the image size but without the image.
If anyone out there knows the correct way of displaying an image? Pls
let me know, thanks!!
_____________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]