Stratadrake on DeviantArthttp://creativecommons.org/licenses/by-sa/3.0/https://www.deviantart.com/stratadrake/art/GIMP-YCC-Inversion-86515731Stratadrake

Deviation Actions

Stratadrake's avatar

GIMP: YCC Inversion

By
Published:
4.8K Views

Description

The inversion technique I use to create all my inversions of traditional media is a three-step process neither difficult nor (very) time-consuming, but even so; here's a GIMP script to perform those steps automatically, with just a single click.

(So, please, no +faving the preview image)

Overview
The script performs a brightness-inversion of the current image layer, swapping light and dark tones while leaving color data (hue and saturation) more or less unchanged. The end result is similar to the GIMP's "Value Invert" command, but without the color distortion produced at low RGB values.

Requirements:
GIMP 2.4 or later.
Sorry, but this script does not run under GIMP 2.2 or earlier.

Download & Installation
  1. Download the file and place it in your GIMP scripts folder. (e.g: %HOMEPATH%\GIMP-2.X\share\gimp\2.0\scripts or similar)

  2. If GIMP is already running, locate the "Script-Fu > Refresh Scripts" menu command (under "Extensions" or "Filters", depending on your version).

  3. The command appears as "Luma invert" under the "Colors > Components" menu.


Notes
  • This can only be performed on one layer at a time, on RGB mode images.

  • Duplicate your original layer before inverting! Due to differences in gamut between the RGB and YCC color models, a double-inversion will not restore the original (pre inverted) colors. Yellow tones are most severely affected by differences in gamut; avoid using them if you can!

  • This script utilizes the YCC ITU R709 model by default. If you prefer to use the YCC ITU R470 model (there is appx. 5% difference in red/green color tones between them), simply change the parameter specified on line 40 of the script.

  • GIMP 2.2 users: Sorry, this script is not compatible with GIMP 2.2 . You'll have to do the steps manually (Decompose using a YCC color model, invert Luma layer, recompose from YCC).

  • Adobe Photoshop users: Those of you with Photoshop proper (not Photoshop Elements) can perform the same inversion by switching your image to "Lab color" mode and then inverting the image's Luma channel. (GIMP does have a "LAB color" option in its decomp, but it has problems with gamma correction)
Comments3
Join the community to add your comment. Already a deviant? Log In
coreper's avatar
awesome!
looks real nice!