Okay, it seems that pycairo hasn't yet implemented all nessesery methods. I found another way though, which I think is useable for the time being.<br><br>surface = cairo.ImageSurface.create_from_png(imagepath)<br>buffer =
surface.get_data_as_rgba()<br><br>data = array ('c', 'a' * surface.get_width() * surface.get_height() * 4)<br>surf = cairo.ImageSurface.create_for_data (data, cairo.FORMAT_ARGB32,<br> surface.get_width(), surface.get_height
(), surface.get_stride())<br>ctx = cairo.Context (surf)<br>ctx.rectangle (0, 0, surface.get_width(), surface.get_height())<br>ctx.set_source_surface(surface, 0, 0)<br>ctx.fill()<br><br># Here the data array can be modified.
e.g. using an algorithm like gimp overlay mode.<br><br>self.surface = cairo.ImageSurface.create_for_data (<br> data, cairo.FORMAT_ARGB32,<br> surface.get_width(), surface.get_height(),<br>
surface.get_stride())<br><br><div><span class="gmail_quote">On 11/19/06, <b class="gmail_sendername">Lobais</b> <<a href="mailto:lobais@gmail.com">lobais@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<tt>Hi, it is possible to get the image data of an image, such that one</tt><br>
<tt>would be able to e.g. get red, green and blue from pixel 8 row 4?</tt>
<br clear="all"><span class="sg"><br><tt>-- </tt><br>
<tt>Best Regards, Thomas</tt>
</span></blockquote></div><br><br clear="all"><br>-- <br>Mvh. Thomas