pixmap to pixbuf
ephrem boudonnet <[email protected]> Mon, 29 May 2006 11:51:52 +0200
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Espen,
I would like to get a pixbuf from my offscreen drawable.
I have written these bindings:
(defbinding colormap-get-system () colormap)
(defbinding pixbuf-get-from-drawable() (referenced pixbuf)
(drawable drawable)
(colormap colormap)
(srx int)
(sry int)
(destx int)
(desty int)
(width int)
(heigth int))
But when I call this function:
(defun pixmap-to-pixbuf ()
(let ((map (gdk::pixmap-new 10 10 1))
(cmap (gdk::colormap-get-system)))
(gdk::pixbuf-get-from-drawable map cmap 0 0 0 0 10 10)
))
I have this error message:
Gdk: gdk_pixbuf_get_from_drawable: assertion `dest->colorspace ==
GDK_COLORSPACE_RGB' failed
[Condition of type glib:critical-log-level]
In fact I don't know how to "specify" the destination pixbuf as the
documentation says:
" If the specified destination pixbuf /dest/ is NULL, then this function
will create an RGB pixbuf with 8 bits per channel and no alpha".
Have you any idea?
Thanx again.
Ephrem