Re: [GD-DEVEL] Using brushes with alpha transparency...

From: Date: Wed, 11 Jul 2007 02:50:51 +0000
Subject: Re: [GD-DEVEL] Using brushes with alpha transparency...
Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-227@lists.php.net to get a copy of this message
Hi Pierre: I created a little test program and some brushes. You can nab them at: ftp://ftp.dnr.state.mn.us/pub/brushtest.zip The archive contains 3 variable opacity brushes, test C program and one output image. The output image (test.png) is the result of; ./testbrush -brush brush_op10.png -output test.png -blend Basically it draws a brushed line using a 10% opaque brush. It also copies the brush into the image so you can see how it looks alone. Checkout the ends of the line and you'll see the issue. I would expect (or was hoping) that the whole line would be a uniform thick line, a blended version of the brush and the black background. Kinda like you'd see with a paint brush tool in Gimp. That's not the case, the resulting line far more opaque than I would expect. I imagine pixels are getting set and blended over and over. The ends of the line are closer to the appearance I would expect. Steve >>> Pierre <pierre.php@gmail.com> 07/07/07 6:33 AM >>> Hi Steve, On 7/6/07, Steve Lime <Steve.Lime@dnr.state.mn.us> wrote: > Hi all: This one has got me stumped and I hope I'm missing something obvious. I have > brushes with variable transparency in the alpha channel. This gives a softer edge when drawing a > wide line. Works terrific is blending is enabled. If blending isn't enabled I was hoping the > result would be a wide line with variable variable transparency (e.g. opaque center and > progressively transparent pixels towards the edge). I've attached samples. You can see what > the brush looks like at the end of the line in the no blending image. Any hope? Can you put a link to the image and code? It looks like the list filtered the attachments. Cheers, --Pierre

« previous php.gd.devel (#227) next »