Search found 5 matches
- 2014-03-24T16:43:50-07:00
- Forum: Magick++
- Topic: Reading transparent SVG files
- Replies: 7
- Views: 21129
Re: Reading transparent SVG files
Actually it turns out that I do have the updated librsvg2 2.40, it was updated after ImageMagick was built, and -list format was just reporting the old version. Rebuilding ImageMagick made it report 2.40, but resulted in no change in identity's output. To make sure which library was getting loaded ...
- 2014-03-24T05:38:45-07:00
- Forum: Magick++
- Topic: Reading transparent SVG files
- Replies: 7
- Views: 21129
Re: Reading transparent SVG files
Maybe I'm not interpreting the opacity value correctly. I thought that the pixel's opacity value of 0 means total transparency, and QUANTUM_MAX is solid color, the same way X RENDER interprets the alpha channel. If I set backgroundColor to Color(0, 0, 0, QUANTUM_MAX), then after loading the SVG ...
- 2014-03-24T05:28:30-07:00
- Forum: Magick++
- Topic: Reading transparent SVG files
- Replies: 7
- Views: 21129
Re: Reading transparent SVG files
So now I have: image.type(Magick::TrueColorMatteType); image.backgroundColor(Magick::Color(0, 0, 0, 0)); After loading the image, the opacity of every pixel is still 0. It's not really that I'm not seeing the transparent background. With opacity 0, all pixels are transparent. There is one difference ...
- 2014-03-24T03:51:41-07:00
- Forum: Magick++
- Topic: Reading transparent SVG files
- Replies: 7
- Views: 21129
Re: Reading transparent SVG files
Here's a couple of them. I wouldn't mind hacking the XML, if it meant getting the transparency right, but this is coming straight out of Inkscape. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc ...
- 2014-03-23T20:47:15-07:00
- Forum: Magick++
- Topic: Reading transparent SVG files
- Replies: 7
- Views: 21129
Reading transparent SVG files
I am trying to read a small SVG file with a transparent background. This is what I'm doing: Magick::Image image; image.type(Magick::TrueColorMatteType); image.read(Magick::Geometry(width, height), filename); auto packet=image.getConstPixels(0, 0, width, height); Scanning all of the pixel packets I ...