<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoDocumentMap, li.MsoDocumentMap, div.MsoDocumentMap
        {margin:0cm;
        margin-bottom:.0001pt;
        background:navy;
        font-size:10.0pt;
        font-family:Tahoma;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>Problem: Pixmap Depth from XGetGeometry doesn’t
agree with XRenderCreatePicture.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>If I create a Pixmap (XCreatePixmap) with a depth of 24
bits, the request to get the Geometry (XGetGeometry) of the created pixmap
 returns it as 32. Ok, I can accept that. But if I then use the Pixmap in
a call to XRenderCreatePicture with a 32-bit ARGB Picture format, the call
fails.  It seems that XRenderCreatePicture ‘knows’ that the
Pixmap is really 24 bits, as requested in the Pixmap creation, rather than 32
bits, as returned in the XGetGeometry call.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>I am simply trying to call XRenderCreatePicture with the
correct PictureFormat type for a Pixmap whose depth I do not know. Using
XGetGeometry to query that depth seemed like the obvious think to do.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>Any ideas what is going on here?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p><font size=3 face=Arial><span style='font-size:12.0pt;font-family:Arial'>Dave<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>