Drawing ZPixmap images with gtk
- From: "John Que" <qwejohn hotmail com>
- To: gtk-app-devel-list gnome org
- Subject: Drawing ZPixmap images with gtk
- Date: Sat, 14 Aug 2004 13:14:00 +0300
Hello,
I had received an application which uses the ZPixmap format for creating and
displaying an image (using XCreateImage and XPutImage.)
The applicatiopn works OK and displays images correctly.
However, I should port it to gtk and I admit I am quite a newbie
in Xlib matters.
First:
I had saved this image to a file.
(I have a variable XImage* image;
and I wrote it's image->data field to a file).
I know of course the width and height of the image.
what is the preferred way to write a gtk application
which will show such a file ?
I had made a little try with gdk rgb (using gdk_rgb_init())
and then when I tried to show the image (using gdk_draw_rgb_image ()
and setting the 8th parameter, guchar *rgb_buf ,to the raw buffer I
have,image->data ) the image I did not get a correct result.
Second:
Is there an open source viewer for such a file ?
It doesn't seems to me a regular RGB file.
regards,
John
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]