Re: How to use a specified color as png transparent color?
Jerónimo Barraco Mármol <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
using a png with alpha channel will be the best suggestion. but maybe you can import a png and use one of cairo painting operator to remove the color.. maybe, i dont know, is just and idea. http://cairographics.org/operators/ i think 1.10 has much more operators than that Jerónimo Barraco Mármol http://nande.com.ar http://ar.linkedin.com/in/nande ________________________________ De: Maarten Bosmans <[email protected]> Para: Carlo <[email protected]> CC: [email protected] Enviado: jueves, 27 de octubre de 2011 3:45 Asunto: Re: [cairo] How to use a specified color as png transparent color? 2011/10/26 Carlo <[email protected]>: > Hi. I would import a png and copy it on a surface with the "target color" > used as transparent color. > I'm working with different set of png, each set has a background color that > I don't want to show. > How can I make this?? Adding a general remark to Bill's answer: Cairo has no functions for import and export of images. The png related functions are mainly for debugging purposes and intentionally only handle a specific subset of PNG files. Furthermore, Cairo is a vector graphics library, so doing pixel-per-pixel operations on an image is not something we really have good support for. These two thing together mean that you are probably better of using another program/library to edit the png files before you use them in Cairo. Maarten -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo