<div dir="ltr">Thanks, the example works perfectly.<div><br></div><div>However, I have a further query. You mentioned earlier that</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">>Please note that CAIRO_FORMAT_A1 and CAIRO_FORMAT_A8 are *not* monochrome</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">>images. They describe images without any colors at all which only contain an</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">>alpha channel. Only when generating a PNG are these images interpreted as</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">>monochrome.</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Now suppose I want to get access to the raw A1 (monochrome) data using cairo_image_surface_get_data(), then this is not possible because as you mentioned it contains only alpha channel. The interpretation happens during PNG writing. Is there any way around this? One option I can think of is to take a look at how cairo_surface_write_to_png() operates on the data (alpha channel), and similarly implement the same to get access to raw data.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks.</span></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, Mar 30, 2014 at 5:01 PM, Uli Schlachter <span dir="ltr"><<a href="mailto:psychon@znc.in" target="_blank">psychon@znc.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 29.03.2014 19:48, Uli Schlachter wrote:<br>
[...]<br>
<div class="">> Anyway, attached is a quick example for this.<br>
</div>[...]<br>
<br>
I hate it when this happens. Now with attachment and, just because I can, the<br>
resulting PNG!<br>
<span class="HOEnZb"><font color="#888888"><br>
Uli<br>
--<br>
A learning experience is one of those things that say,<br>
'You know that thing you just did? Don't do that.'<br>
-- Douglas Adams<br>
</font></span></blockquote></div><br></div></div>