SVG Alpha Problem with rsvg

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mikerlewis

SVG Alpha Problem with rsvg

Post by mikerlewis »

Say I make a box that's white with 50% alpha, and render it with a transparent background to a png. With rsvg-convert it makes the colors FFFFFF80 which is correct. ImageMagick does 80808080 (looks like it's premultiplying the alpha for some reason).

This even happens when I let it do a white background. the 50% white background actually darkens the background.


Here's the rsvg-convert output (which I believe is correct):
Image

Here's the ImageMagick
convert -background none alpha_box.svg "im_none.png"
Image

convert alpha_box.svg "im.png"
Image


SVG is here
http://allyourmuffins.com/alpha_box.svg


Here's the version (have run this on both an ubuntu and debian system too)

Code: Select all

mike@chumpbook[~/Desktop] % convert -version
Version: ImageMagick 6.5.7-0 2009-11-13 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Here's my configure

mike@chumpbook[~/Desktop] % convert -list Configure

Code: Select all

Path: /opt/local/lib/ImageMagick-6.5.7/config/configure.xml

Name          Value
-------------------------------------------------------------------------------
CC            /usr/bin/gcc-4.2 -std=gnu99
CFLAGS        -fopenmp -O2 -arch x86_64 -Wall -W -D_THREAD_SAFE
CONFIGURE     ./configure  '--prefix=/opt/local' '--enable-shared' '--enable-static' '--disable-ltdl-install' '--without-openexr' '--disable-hdri' '--with-dps' '--with-bzlib' '--with-fontconfig' '--with-jpeg' '--with-png' '--with-tiff' '--with-zlib' '--with-modules' '--with-xml' '--with-x' '--without-perl' '--without-fpx' '--without-gslib' '--without-jbig' '--without-jp2' '--without-lcms' '--without-wmf' '--without-gvc' '--without-lqr' '--with-rsvg' '--with-quantum-depth=16' 'CC=/usr/bin/gcc-4.2' 'CFLAGS=-O2 -arch x86_64' 'LDFLAGS=-L/opt/local/lib' 'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/g++-4.2' 'CXXFLAGS=-O2 -arch x86_64'
COPYRIGHT     Copyright (C) 1999-2009 ImageMagick Studio LLC
CPPFLAGS      -I/opt/local/include/ImageMagick
CXX           /usr/bin/g++-4.2
CXXFLAGS      -O2 -arch x86_64 -Wall -W -D_THREAD_SAFE
DEFS          -DHAVE_CONFIG_H
DELEGATES     bzlib fontconfig freetype jpeg jng png rsvg tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS 'CC=/usr/bin/gcc-4.2' 'CFLAGS=-O2 -arch x86_64' 'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/g++-4.2' 'LDFLAGS=-L/opt/local/lib' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-fpx=no --with-gslib=no --with-fontpath= --with-gvc=no --with-jp2=no --with-lcms=no --with-lqr=no --with-openexr=no --with-wmf=no
EXEC-PREFIX   /opt/local
HOST          i386-apple-darwin10.2.0
LDFLAGS       -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib
LIB_VERSION   0x657
LIB_VERSION_NUMBER 6,5,7,0
LIBS          -lMagickCore -ltiff -lfreetype -ljpeg -L/opt/local/lib -lfontconfig -lexpat -lfreetype -lz -liconv -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /opt/local
QuantumDepth  16
RELEASE_DATE  2009-11-13
VERSION       6.5.7
WEBSITE       http://www.imagemagick.org
mikerlewis

Re: SVG Alpha Problem with rsvg

Post by mikerlewis »

Any thoughts? Am I posting in the wrong forum?
mikerlewis

Re: SVG Alpha Problem with rsvg

Post by mikerlewis »

Posted a patch to fix this here viewtopic.php?f=2&t=15081
Post Reply