“Poster Effect Gallery” is a special effects script using the JSON Action Manager scripting library.
This stand-alone script written in JavaScript applies on an existing RGB image a preset color posterization effect, made of a stack of fill layers associated with masks corresponding to different levels of threshold. The original image is not modified.
Images created with this script can be edited later on; for instance, it is possible to use the script Change Layer Content to modify the content of the fill layers (among: solid color, gradient or pattern).
In the “Poster Effect” dialog panel, use the left menu to select the set of effects, then use the right menu to select the effect you want to apply; if you choose the last item named “*Every Effect*”, then each effect of the set will be applied on a new copy of the image, giving you the opportunity to compare between them.
As a convenience, double-clicking on any slider’s label (on its left side) resets it to its default value.
All the options set in the dialog are also recorded in the generated image document’s Description field, which can be accessed from the File>File Info... submenu.
{ "set": "Flat Poster", "effect": "Obama Hope (GIMP)", "equalize": false, "gamma": 1, "blur": 3.2, "smooth": 0, "expand": 2, "useVectorMasks": true, "tolerance": 1, "scaleEffects": 100 }Presets are actually plain JSON text files, found in the Presets folder located at the same level than the script:
Each preset file contains a JSON object of poster effects usually made of sequences of fill layers, as documented in the Layer Object Simplified Format page:
- Gradient fill
- Pattern fill
- Solid color fill
However, there is no restriction on the use of adjustment layers as well:
- Black & white adjustment
- Brightness/contrast adjustment
- Channel mixer adjustment
- Color balance adjustment
- Curves adjustment
- Exposure adjustment
- Gradient map adjustment
- Hue/saturation adjustment
- Invert adjustment
- Levels adjustment
- Photo filter adjustment
- Posterize adjustment
- Selective color adjustment
- Threshold adjustment
- Vibrance adjustment
Each layer may have a mask, usually obtained from various image thresholds or from image transparency.
And finally, it is possible to apply a local or global style to each layer, each style being made of layer effects (in Layer Effects Object Simplified Format) and blending options (in Blending Options Object Simplified Format).
A preset file is made of a JSON object:
{
"posterEffects": posterEffects,
"patternsFileBinary": patternsFileBinary
}
posterEffects : JSON object made of several members, one for each poster effect; each key is the effect name, and each associated value is a JSON object in Poster effect format
patternsFileBinary : [optional] string (binary data of the patterns file containing all the patterns referenced by name and ID in the preset file)
"layers": layers,
"grayscale": grayscale,
"style": style
}
layers : JSON array of JSON objects in Layer data format
grayscale : [optional] string, among "legacy", "maxRGB", "minRGB", "luma" (by default)
style : [optional] JSON object in Layer style format (global style applied to each layer with mask, provided no local style is already defined)
{
"layer": layer,
"mask": mask,
"style": style
}
layer : JSON object in Layer Object Simplified Format
mask : [optional] JSON object in Mask format
style : [optional] JSON object in Layer style format (local style applied to the layer)
{
"type": type,
"inverse": inverse
}
type : JSON object in Mask type format inverse : [optional] boolean (
falseby default; iftrue, mask is inverted)
{ "imageThreshold": imageThreshold }
or
{ "imageTransparency": imageTransparency }
or
{ "pattern": pattern }
or
{ "frame": frame }
or
{ "rectangularSelection": rectangularSelection }
or
{ "ellipticalSelection": ellipticalSelection }
or
{ "polygonalSelection": polygonalSelection }
imageThreshold : number (threshold value, from 1 to 255)
imageTransparency :null, or number (expand value, from -100 to +100 pixels), or JSON array of two numbers (low and high expand values, from -100 to +100 pixels)
pattern : JSON object in Pattern format
frame : number (thickness of frame, in pixels)
rectangularSelection : JSON array in Rectangle Object Simplified Format
ellipticalSelection : JSON array in Ellipse Object Simplified Format
polygonalSelection : JSON array in Point List Simplified Format
{
"blendOptions": blendOptions,
"layerEffects": layerEffects
}
blendOptions : [optional] JSON object in Blending Options Object Simplified Format
layerEffects : [optional] JSON object in Layer Effects Object Simplified Format)
{
"name": name,
"ID": ID
}
name : string
ID : string (UUID)
{
"set": "Flat Poster",
"effect": "Obama Hope (GIMP)",
"equalize": false,
"gamma": 1,
"blur": 3.2,
"smooth": 0,
"expand": 2,
"useVectorMasks": true,
"tolerance": 1,
"scaleEffects": 100
}{
"set": "Pop Art",
"effect": "Andy A (Transparency)",
"equalize": false,
"gamma": 1,
"blur": 2,
"smooth": 0,
"expand": 0,
"useVectorMasks": true,
"tolerance": 1,
"scaleEffects": 100
}{
"set": "Simple Poster",
"effect": "Black & White / Gray",
"equalize": false,
"gamma": 0.85,
"blur": 0,
"smooth": 2,
"expand": 0,
"useVectorMasks": true,
"tolerance": 1,
"scaleEffects": 100
}{
"set": "Styled Poster",
"effect": "Gradient",
"equalize": false,
"gamma": 1,
"blur": 2,
"smooth": 0,
"expand": 0,
"useVectorMasks": true,
"tolerance": 1,
"scaleEffects": 100
}This script can be used in Adobe Photoshop CS4 or later. It has been successfully tested in CS4 on Mac OS X, but should be platform agnostic.
This Software is copyright © 2015-2016 by Michel MARIANI.
This Software is licensed under the GNU General Public License (GPL) v3.
Download the Zip file and unzip it.
Move the entire script FOLDER (Poster Effect Gallery Folder) with its contents into the Presets/Scripts folder in the default preset location of the Adobe Photoshop application. On next launch, the script will appear in the File>Automate submenu.











