Re: Thanks and a question/suggestion
From: Arnar Mar Hrafnkelsson (email@example.com)
Date: Tue 12 Nov 2002 - 02:42:24 GMT
I have one thought about the 'brush problem'. For the case where you have
a radially symmetric brush (I.e. only a function of the distance from the
center of the brush). We could actually do some nice things, but It's not
clear how fast those could be done. One idea was to simply take your
lines and calculate for all points within distance brush_diameter/2 from
the line the brush color value. This would need to be done in a buffer to
be good about things that cross and such.
Hope this explanation makes sense.
On Sun, 10 Nov 2002, Georg Rehfeld wrote:
> Hi Imager developers,
> I'm new to this list, so please let me introduce myself:
> - occasional perl user/developer since ~ 10 years
> - OO using Java (and perl) since 4 years and in the future
> Thanks to all Imager developers for giving it to me and the world!
> Nice work and MUCH better than GD. It's near to replace photoshop/
> gimp when it comes to batch/programmed jobs. Hey, I really like it!
> Note, that I'm just a USER of Imager, don't expect me to have the
> neccessary knowledge to enhance it, I can only ask for/suggest
> features (currently).
> My actual fun-project using Imager is sort of a plot and, though
> I have several other ways to proceed, I'm missing one feature in
> Imager, that photoshop and gimp have (and GD incorrectly claims to
> have): drawing with a brush.
> You all know, what photoshop/gimp can do with brushes: draw
> points, lines, polylines using a little image, typically more
> opaque in the center and transparent in the outer regions. The brush
> is grayscale with transparency. The essential point is: along a
> line the brush image is not stupidly used pixel for pixel to
> overdraw, what is in the image already, as with GD. Instead the
> outer regions along the line have the brush transparency preserved
> so that a nice antialiased line is drawn over the image.
> The stupid GD approach (draw the first pixel of the line with the
> brush, then draw the next pixel over what GD just had drawn ...)
> ends up in a nearly opaque line, regardless of the transparency
> of brush pixels.
> Remember, I'm NOT an expert at all, but I believe, one way to go
> - have a temporary grayscale buffer for the line to draw,
> initialized to all transparent
> - draw the brush pixels only there, where the buffer is more
> transparent or more light
> - copy the buffer onto the image with transparency (rubthrough)
> and in the requested foreground color
> Do you have a plan to add brush drawing? If not, is there any taker
> (sorry, I WOULD be a taker, but I CAN'T)? A new 'brush=>$brush_img'
> parameter would be neccessary in several places.
> ___ ___
> | + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
> |_|_\ |___ firstname.lastname@example.org +49 (40) 23 53 27 10
> PS: The fun project (a fancy year calendar with HTML map support
> in pre-alpha state) to be contributed to the Imager project,
> when it's some day beta or better.