![]() |
fading text layer - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: fading text layer (/Thread-fading-text-layer) |
fading text layer - mwas - 07-31-2023 Hi, I am new to this forum so if I my question is in the wrong section, well, sorry I guess! I have a pdf form to fill like 500 times and I thought using a gimp python plugin is the way to do it. I have developed the said plugin and I can successfully fill the form except that the text layers I am adding are too sharp. Before I save the file manually, I usually use the blur tool to make the text look like it was filled with a pen. I have tried to do this in the plugin but I can't get i right. I am using the gimp.convolve() function. I guess my problem is obtaining the stroke points of the text layer. Can somebody please help me. Thanks. RE: fading text layer - Ofnuts - 07-31-2023 (07-31-2023, 09:39 AM)mwas Wrote: Hi, I am new to this forum so if I my question is in the wrong section, well, sorry I guess! It would be easier with pdb.plug_in_gauss(image, drawable, horizontal, vertical, method). But perhaps using dark gray instead of black, or reducing the layer opacity a bit would work just as well. If you want to stroke the convolve tool along the text path outline, two solutions:
RE: fading text layer - mwas - 07-31-2023 (07-31-2023, 11:56 AM)Ofnuts Wrote: It would be easier with pdb.plug_in_gauss(image, drawable, horizontal, vertical, method).I tried the pdb.plug_in_gauss() but I couldn't see any discernible difference may be I was doing it wrongly. For the colours I am using a variation of colours (I am simulating filling the forms by hand so I am using different colours with different opacity levels and different handwriting fonts). I will try the solutions and see later. NB: The gimp.convolve() function's parameters are: drawable - DRAWABLE, pressure - FLOAT, convolve-type - INT32 num-strokes - INT32 Number of stroke control points (count each coordinate as 2 points) (num-strokes >= 2) strokes - FLOATARRAY - Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y } it is the number of strokes and strokes parameters that I have a problem with. RE: fading text layer - Ofnuts - 07-31-2023 (07-31-2023, 04:57 PM)mwas Wrote:(07-31-2023, 11:56 AM)Ofnuts Wrote: It would be easier with pdb.plug_in_gauss(image, drawable, horizontal, vertical, method).I tried the pdb.plug_in_gauss() but I couldn't see any discernible difference may be I was doing it wrongly. The strokes parameter is a "flat" list of coordinate pairs: [x1,y1,x2,y2,x3,y3] and the num_strokes parameter is the length of that list (6, here), so, in python, the same as len(strokes). |