Poster Effect Gallery

Description

“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.

Poster Effect Gallery Dialog (Mac OS X)

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

Overview

Presets are actually plain JSON text files, found in the Presets folder located at the same level than the script:

Poster Effect Gallery Folder Window (Mac OS X)

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).

Preset file 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)

Poster effect

Defined as a JSON object:

{
    "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 data

Defined as a JSON object:

{
    "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)

Mask

Defined as a JSON object:

{
    "type": type,
    "inverse": inverse
}

type : JSON object in Mask type format
inverse : [optional] boolean (false by default; if true, mask is inverted)

Mask type

Defined as a JSON object:

{
    "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

Layer style

Defined as a JSON object:

{
    "blendOptions": blendOptions,
    "layerEffects": layerEffects
}

blendOptions : [optional] JSON object in Blending Options Object Simplified Format
layerEffects : [optional] JSON object in Layer Effects Object Simplified Format

Pattern

Defined as a JSON object:

{
    "name": name,
    "ID": ID
}

name : string
ID : string (UUID)

Examples

Flat Poster | Obama Hope (GIMP)

Charity (Hope)

{
    "set": "Flat Poster",
    "effect": "Obama Hope (GIMP)"
    "equalize": false,
    "gamma": 1,
    "blur": 3.2,
    "smooth": 0,
    "expand": 2,
    "useVectorMasks": true,
    "tolerance": 1,
    "scaleEffects": 100
}

Obama Hope Effect in Layers Palette

Pop Art | Andy A (Transparency)

Charity (Andy A)

{
    "set": "Pop Art",
    "effect": "Andy A (Transparency)",
    "equalize": false,
    "gamma": 1,
    "blur": 2,
    "smooth": 0,
    "expand": 0,
    "useVectorMasks": true,
    "tolerance": 1,
    "scaleEffects": 100
}

Andy A Effect in Layers Palette

Simple Poster | Black & White / Gray

Charity (B&W / Gray)

{
    "set": "Simple Poster",
    "effect": "Black & White / Gray",
    "equalize": false,
    "gamma": 0.85,
    "blur": 0,
    "smooth": 2,
    "expand": 0,
    "useVectorMasks": true,
    "tolerance": 1,
    "scaleEffects": 100
}

B&W / Gray Effect in Layers Palette

Styled Poster | Gradient

Charity (Styled Gradient)

{
    "set": "Styled Poster",
    "effect": "Gradient",
    "equalize": false,
    "gamma": 1,
    "blur": 2,
    "smooth": 0,
    "expand": 0,
    "useVectorMasks": true,
    "tolerance": 1,
    "scaleEffects": 100
}

Gradient Effect in Layers Palette

Original Test Images

Charity

Charity (Transparent)

Requirements

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.

Copyright

This Software is copyright © 2015-2016 by Michel MARIANI.

License

This Software is licensed under the GNU General Public License (GPL) v3.

Download

Installation

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.

Version History

  • 1.4

    • Added possibility of defining a contour using low and high expand values for transparency mask.
    • Added more presets.
  • 1.3

    • Improved grayscale conversion.
    • Added equalize in pre-process.
  • 1.2

    • Fixed numerical glitch in sliders.
    • Deferred saving transparency after pre-process and grayscale conversion.
  • 1.1

    • Used new version 4.4.4 of jamEngine scripting library module.
    • Fixed incorrect handling of patterns file binary string.
    • Improved syntax for global options and masks.
  • 1.0

    • Initial release.

Tags: , , , , , , , , , , ,

Comments are closed.