using a png with alpha channel will be the best suggestion.
<br />but maybe you can import a png and use one of cairo painting operator to remove the color..
<br />maybe, i dont know, is just and idea.
<br />http://cairographics.org/operators/
<br />i think 1.10 has much more operators than that<div> </div>Jerónimo Barraco Mármol</div><br/><br/><div>http://nande.com.ar<br />http://ar.linkedin.com/in/nande<br><div style="font-family: verdana, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">De:</span></b> Maarten Bosmans <mkbosmans@gmail.com><br><b><span style="font-weight: bold;">Para:</span></b> Carlo <defrag1986@gmail.com><br><b><span style="font-weight: bold;">CC:</span></b> cairo@cairographics.org<br><b><span style="font-weight: bold;">Enviado:</span></b> jueves, 27 de octubre de
2011 3:45<br><b><span style="font-weight: bold;">Asunto:</span></b> Re: [cairo] How to use a specified color as png transparent color?<br></font><br>2011/10/26 Carlo <<a ymailto="mailto:defrag1986@gmail.com" href="mailto:defrag1986@gmail.com">defrag1986@gmail.com</a>>:<BR>> Hi. I would import a png and copy it on a surface with the "target color"<BR>> used as transparent color.<BR>> I'm working with different set of png, each set has a background color that<BR>> I don't want to show.<BR>> How can I make this??<BR><BR>Adding a general remark to Bill's answer:<BR><BR>Cairo has no functions for import and export of images. The png<BR>related functions are mainly for debugging purposes and intentionally<BR>only handle a specific subset of PNG files.<BR><BR>Furthermore, Cairo is a vector graphics library, so doing<BR>pixel-per-pixel operations on an image is not something we really have<BR>good support for.<BR><BR>These two thing
together mean that you are probably better of using<BR>another program/library to edit the png files before you use them in<BR>Cairo.<BR><BR>Maarten<BR>--<BR>cairo mailing list<BR><a ymailto="mailto:cairo@cairographics.org" href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><BR><a href="http://lists.cairographics.org/mailman/listinfo/cairo" target=_blank >http://lists.cairographics.org/mailman/listinfo/cairo</a><br><br></div></div>