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

[email protected] (Pierre)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Steve,

On 7/11/07, Steve Lime <[email protected]> wrote:
> 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.

Sorry for the late reply, I was busy lately.

I have created a new issue in bugs.libgd.org:

http://bugs.libgd.org/?do=details&task_id=99


It is definitively a (old) bug and I'm not sure if there is an easy
way to fix to fix it. It will certainly require a true brush based
drawing tools (with masks and all other requirements).

A common usage for such tool is to draw thick lines (or outlines for
shapes) with custom line ending. Is it what you try to achieve?

Cheers,
--Pierre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.