Open sunwoo76 opened 2 months ago
Hello @sunwoo76,
The best way is to use an SVG file with a transparent background, of course. With this SVG:
I can run:
vips copy lion.svg x.png
To make:
If your SVG file has a solid background, you can write some code to search for background pixels and make them transparent, but the quality may not be so good. It's hard to get the edges exactly right, and hard to always detect all the background.
Do you have a sample SVG? What quality level do you need?
I have a simple code as below:
The result always have RGB white colored background.
how can I save the svg file with transparent rgba background in png format?
Thanks!