<div dir="ltr">Hello again!<div><br></div><div style>Turns out that the code works well on other machines. I'd really appreciate any help that could let me pinpoint the problem. I did get a list of things to check from psychon in #cairo@freenode, but none of them seem to indicate a problem. I have ensured:<br>
</div><div style><br></div><div style> - Using xsetroot to have different background colors for my x root window, the black pixels are not due to a black root window with no children rendered.</div><div style> - I can take screenshots using `import -window root asdf.png`</div>
<div style> - xwininfo -root and xwininfo on visible windows show that they have the same depth and visual properties.</div><div style><br></div><div style>// Oliver</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Oct 8, 2013 at 7:41 PM, Oliver <span dir="ltr"><<a href="mailto:embry00s@gmail.com" target="_blank">embry00s@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello!<div><br></div><div>I'm writing an application that needs to take screenshots and send them over the network. I'm trying to use cairo_xlib_surface_create and then cairo_surface_write_to_png[_stream]. I've managed to get cairo to write proper png files, but they are all entirely black. Would really appreciate any help in the matter.</div>
<div><br></div><div>I've created a small repository with the relevant code here: <a href="https://bitbucket.org/oliveruv/native_capper/src" target="_blank">https://bitbucket.org/oliveruv/native_capper/src</a></div><div>
<br></div><div>The relevant functions are captester.cpp::main, libsc.cpp::configure and libsc.cpp::prntScreen. The stream writing things exhibit the same problem, but are a bit less direct.</div><div><br></div>
<div>Warm regards,</div><div>Oliver Uvman</div></div>
</blockquote></div><br></div>