possible bug in -border with transparency IM 6.5.2-4
Posted: 2009-05-12T16:01:30-07:00
IM 6.5.2-4 Q16 Mac OSX Tiger.
I was testing my texteffect script with transparent background for a user and ran into this puzzling side-effect. I am basically doing a blur text effect with text color opaque blue rgba(0,0,255,1) and transparent white background rgba(255,255,255,0). The problem is that at the very end, just before the -border step (where I try to add back a transparent white border) all is fine, but afterwards much of the image turns black (like an undercolor of black) after transparency is removed. I cannot figure out if I am making a mistake, do not understand something critical or if there is a bug in -border when used with transparency. I cannot duplicate this by adding, trimming and adding back a transparent white background around the rose image. Thus I am providing the following, which is as simple as I can make it. See the images produced at various stages before and after turning off transparency.
convert -size 139x57 xc:"rgba(255,255,255,0)" \
-fill "rgba(0,0,255,1)" -stroke none \
-font Arial -pointsize 48 \
-gravity center -annotate 0x0+0+0 "TEST" -blur 0x3 -write texteffect_tmp1.png \
-trim +repage -write texteffect_tmp2.png \
-bordercolor "rgba(255,255,255,0)" -border 5 texteffect_tmp3.png

convert texteffect_tmp1.png -alpha off texteffect_tmp1_aoff.png


convert texteffect_tmp2.png -alpha off texteffect_tmp2_aoff.png


convert texteffect_tmp3.png -alpha off texteffect_tmp3_aoff.png

I hope someone can explain this to me where the black is coming from (and if possible how to avoid that without leaving off the -trim ... -bordercolor ... -border). Thanks
Fred
I was testing my texteffect script with transparent background for a user and ran into this puzzling side-effect. I am basically doing a blur text effect with text color opaque blue rgba(0,0,255,1) and transparent white background rgba(255,255,255,0). The problem is that at the very end, just before the -border step (where I try to add back a transparent white border) all is fine, but afterwards much of the image turns black (like an undercolor of black) after transparency is removed. I cannot figure out if I am making a mistake, do not understand something critical or if there is a bug in -border when used with transparency. I cannot duplicate this by adding, trimming and adding back a transparent white background around the rose image. Thus I am providing the following, which is as simple as I can make it. See the images produced at various stages before and after turning off transparency.
convert -size 139x57 xc:"rgba(255,255,255,0)" \
-fill "rgba(0,0,255,1)" -stroke none \
-font Arial -pointsize 48 \
-gravity center -annotate 0x0+0+0 "TEST" -blur 0x3 -write texteffect_tmp1.png \
-trim +repage -write texteffect_tmp2.png \
-bordercolor "rgba(255,255,255,0)" -border 5 texteffect_tmp3.png

convert texteffect_tmp1.png -alpha off texteffect_tmp1_aoff.png


convert texteffect_tmp2.png -alpha off texteffect_tmp2_aoff.png


convert texteffect_tmp3.png -alpha off texteffect_tmp3_aoff.png

I hope someone can explain this to me where the black is coming from (and if possible how to avoid that without leaving off the -trim ... -bordercolor ... -border). Thanks
Fred