Re: How to use a specified color as png transparent color?

Maarten Bosmans <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CA+CvcKTd5C6ywDVjzQ8s0p=RW2ZBPZfqmHQgk7pvY7GthHoYzA@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.