Plug-in Title : "
TexturizeByColourArea"
Gimp Menu :
"<Image>/Diego/Quantize"
Release : 1.0 (initial)
Author : Diego Nassetti (dinasset - gimpchat.com)
Licence : GNU General Public License
System Environment used in development
--------------------------------------
Platform : Windows 10 64-bits
Graphic Apps : Gimp 2.8.16
G'mic 1.7.2
Language : python as included in Gimp
Extrn Filters : (Gimp) script_fu_chisel (by Rob Antonishen)
available under Gimp-chat Scripts&Plug-ins as "Chisel Or Carve" Summary Filter to implement the creation on a NEW IMAGE (dimension is a user option)
starting from an RGB* input image
where colours are quantized using the temporary conversion of the image
from RGB to Indexed (nr of colours is a user option)
each color area is filled with a SELECTED SET OF TEXTURES (user option).
Filter has been created on the basis of Gimp-chat threads "Ive got Wood!" & "Let's carve some wood".
Even if the main use will be with patterns in wood, it has been generalized
so that you can use any set of textures you like, patterns or gradients
(for this reason "wood" does not appear in the filter's name)
Details Flow implemented to get the final result:
1. calculate the new image width and height scale for the output (user choice for dimensions)
2. save and set-up context values
3. create the new image by appropriately scaling the input image dimensions
4. create the BG layer for the new image by copying the input layer, scaled
5. add alpha to the layer is not present
6. create a new layer (dup of the BG) for smoothed colours, SOFTLIGHT
7. apply G'MIC Anisotropic Smoothing
8. create a new layer (dup of the Smoothed Layer) for the quantization
9. transform the image from RGBA to Indexed, with the user chosen number of colours
10.create a temporary palette
11.back to RGBA
12.load the complete set of textures chosen: array of names and calculated luminosity values
the textures may be patterns as well as gradients
13.loop on each different color area, selected by using the palette
a- if the user choice is for having the best texture matching by luma, do so
otherwise choose a random texture
b- if the colour area (in pixels) is small the width value is small and the effect is chisel, if it's big the width value is big and the effect is carve, if medium the width value is medium and the effect is chisel
c- fill the area with the chosen pattern/gradient
d- apply the chisel/carve filter
e- merge the layer created by the chisel into the source layer
14.set the texturized layer to GRAIN-MERGE
15.create a new layer from visible and set to SOFT-LIGHT at 45% opacity
16.if the user chose to perform an artistic post-processing,
apply the selected one
17.if the user chose to perform a colour postprocessing,
apply the selected one;
the following artistic post-processes are selectable:
"Graphic Boost",
"Graphic Novel",
"Anguish",
"Colored Pencil",
"Make Squiggly",
"Poster Edges",
"Posterized Dithering",
"Samj Texture Coloree".
the following colour post-processes are selectable:
"Chroma Boost",
"Color Balance",
"Sepia",
"Metallic Look - Silver",
"Metallic Look - Copper",
"Metallic Look - BlueSteel",
"Textured Glass".
18.if the user chose to move the background layer on top,
raise BG to the top and even duplicate it to allow
the use of combined modes and opacities
19.Analyze the BG Layer luminosity and set the top layer mode to:
- color if the image is very dark
- multiply if the image is very light
- hard-light otherwise
20.flatten the image is requested, recalling nr of colours and type of filler in the drawable name
Acknowledgments This filter has been thoroughly tested by my dear gimp-chat friend Issabella (thanks a lot!)
her suggestions were carefully taken into consideration for the final release
=================================================================
Releases (all releases will be dropped in here)
Initial Release
Attachment:
Edit:
new release (with a different name)
Attachment:
For the fans of this filter (particularly for animicule ...!) I publish here a new release, which has a different name to let the user keep both releases
The main difference is that among the options it is now available a new one:
"best luma & colour"
the option "random" has been removed
Hope you enjoy it