<div><div><div dir="auto">And how might you figure out what you have: 4 bits of RGBA or 5 bits with a pad or something else? Docs feel a bit scant. </div></div></div><div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 5, 2019 at 6:07 PM Suhail Doshi <<a href="mailto:suhail@mightycomputing.com" target="_blank">suhail@mightycomputing.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Is there a way to just get 8-bits per channel (3 or 4 channel)?</div></div><div dir="auto"><br></div><div dir="auto">I am using an encoder that accepts 8-bit packed RGBA. </div><div dir="auto"><br></div><div dir="auto">Ideally, I don’t have to do bit manipulation on my own because that will slow things down.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 5, 2019 at 5:56 PM Alan Coopersmith <<a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 8/5/19 5:51 PM, Suhail Doshi wrote:<br>
> Hi there,<br>
> <br>
> I am trying out this<br>
> code: <a href="https://gist.github.com/Suhail/3ae62751857ff034a027adcacd350b69" rel="noreferrer" target="_blank">https://gist.github.com/Suhail/3ae62751857ff034a027adcacd350b69</a><br>
> <br>
> One thing I noticed is that when I print the xcb image struct info I don't get<br>
> the image size I was expecting:<br>
> <br>
> xcb_image_print() Printing a (1024,768) xcb_image_t of 1572864 bytes, depth: 16,<br>
> bpp: 16<br>
> <br>
> Do you know why ximg->size wouldn't be 1024*768*3 (3 channel: RGB)? Or 4 channel?<br>
> <br>
> 1572864 seems like an odd size.<br>
<br>
It's the size I'd expect - 1024 * 768 * 2 (where 2 is 16 bits-per-pixel divided<br>
by 8 bits per byte).  You might have 4 bits each of RGBA or 5 bits each of RGB<br>
plus a pad bit, or some other combination of channels, in those 16 bits.<br>
<br>
-- <br>
        -Alan Coopersmith-               <a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a><br>
         Oracle Solaris Engineering - <a href="https://blogs.oracle.com/alanc" rel="noreferrer" target="_blank">https://blogs.oracle.com/alanc</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="m_7378789193058293445m_-5811298177665353711gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Suhail</div><div dir="ltr"><br></div><div dir="ltr">--</div><div dir="ltr"><br></div><div dir="ltr">Founder</div></div></div></div></div>
</blockquote></div></div>-- <br><div dir="ltr" class="m_7378789193058293445gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Suhail</div><div dir="ltr"><br></div><div dir="ltr">--</div><div dir="ltr"><br></div><div dir="ltr">Founder</div></div></div></div></div>
</div>