This thread supersedes the previous one concerning my experiments.
After various tests I decided to publish the "official" filter.
===========================================
Plug-in Title : "PointillismEffects"
Gimp Menu : "<Image>/Diego/Artistic"
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
Language : python as included in Gimp
Extrn Filters : (Gimp) LumaInvert (script-fu-invert-YUV.scm by "Stratadrake")
(Gimp) Gimpressionist (additional Presets defined)
(G'MIC) none
Summary
-------
Filter to implement the creation on a NEW IMAGE (dimension is a user option)
starting from an RGB* input image/drawable; the core function
works on a duplicated layer replacing each pixel with a (quasi)random colored pixel
having more or less the same average luminosity of the original.
Filter has been inspired by Gimp-chat thread "interesting but not what i'd expected"
by trandoductin.
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. add a preliminary preprocessing to normalize (people) or partially equalize (others) the colours
7. create a new layer (dup of the BG) for random pixels
8. transform this layer using an ancillary function (using tiles to be fast)
source values are exaluated multiplying values by 1+luma factors
a threshold is established to identify the prevailing colour
(colours different of less than the threshold are considered equal)
each pixel is replaced (partially) by a random colour chosen among the "surrounding" colours (a triplet)
e.g. a source pixel with a prevailing cyan colour is replaced by a cyan, green or blue nuance
9. create a copy and apply a GIMPressionist effect (preset is a user choice)
10 .the created painted layer is submitted to a partial retinex effect
11. raise BG to the top (grain-merge)
12. again (softlight)
13. dup but invert YUV
14. visible layer on top, excluding the bottom BG
15. apply a curve to the values, after desaturation
15. flatten the image is requested
Acknowledgments
---------------
Previous experimental release has been tested by Issabella, Marek, Dalia, Pat, Animicule
outcomes/comments helped in making the improvements implemented in current release
==================================================================================================
----------------------------------------------------------------
COPYRIGHT NOTICE
----------------------------------------------------------------
This program is free software you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program if not, you can view the GNU General Public
License version 3 at the web site
http://www.gnu.org/licenses/gpl-3.0.html Alternatively you can write to the Free Software Foundation, Inc., 675 Mass
Ave, Cambridge, MA 02139, USA.
------------------------------------------------------------------------------------------------------
other info:
for those who have tested my experimental previous release
these are the main differences:
a)
new parameter "Strength" allows the user to choose between:
low : suitable particularly for portraits
high : for the generality of the images
(including portraits for those who like the effect)
b)
new preset selection method (search for a file) allows the user
to choose between:
user defined presets (like those attached or others)
Win users find them usually under (user)/gimp-2.x/Gimpressionist/Presets
std GIMPressionist presets Win users find them usually under C:/Program Files/GIMP 2/share/gimp/2.0/gimpressionist/Presets
click over the parameter and browse either folder
c)
new parameter "Paint layer mode" allows the user to choose the combination
of the GIMPressionist painting layer and the Pointillistic layer among:
normal : standard mix
softlight : increases the colour
color : diminishes the contrast
saturation : increases the lightness
darken only : increases the structure
suggestions for further personalize the outcome:
the outcomes when using the "low" strength show usually very "moderate" effects
hence likely they do not need special treatments
the outcomes when using the "high" strength may be easily modified by operating
on the opacity of the top layer
if the user likes to modify modes and opacity of the lower layers it is suggested
to set off the visibility of the 2 top layers then recreate the "now visible" layer
after the modifications
-------------------------------------------------------------------------------------------------------
attachments:
initial release of the filter
Attachment:
initial set of GIMPressionist presets
Attachment:
Presets.7z [1.8 KiB]
Downloaded 197 times