XGetImage problem...

Carsten Haitzler (The Rasterman) raster at rasterman.com
Fri Mar 24 16:36:32 PST 2006


On Fri, 24 Mar 2006 12:46:32 +0100 Marcus Schäfer <ms at suse.de> babbled:

> Hi,
> 
> > > --code snippet--
> > > 
> > > 	rootpixmap = *(Pixmap*)data;
> > > 	image = XGetImage (
> > > 		dpy, rootpixmap, x1, y1, widht, height, AllPlanes, ZPixmap
> > > 	);
> > > 
> > > The position values for x1 and y1 are correct and the width and
> > > heigth are as well correct corresponding to the current window
> > > position and size
> > > 
> > > The result is a bad match which I don't understand ?
> > 
> > Have you tried calling XGetGeometry on rootpixmap to check that your
> > rectangle is within bounds?
> 
> I added a call to XGetGeometry and printed the values which
> are really really out of any range... very big negative integers
> so XGetImage is surely right with its BadMatch exception

man XGetGeometry

use its RETURN value to determine if the call succeeded or failed.

> I asume the data I got from the XGetWindowProperty() call is
> far away from beeing a pixmap but it returend "Success"
> 
> Hmm
> 
> Thanks
> 
> Regards
> Marcus
> -- 
>  Public Key available
>  -------------------------------------------------------
>  Marcus Schäfer (Res. & Dev.)   SUSE LINUX Products GmbH
>  Tel: 0911-740 53 0             Maxfeldstrasse 5
>  FAX: 0911-740 53 479           D-90409 Nürnberg
>  http://www.suse.de             Germany
>  -------------------------------------------------------
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)



More information about the xorg mailing list