Skip to content

filmtools/negdiv.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

negdiv.sh

Shell script for removing the orange mask on color negatives and inverting them to positive

This is Antti Penttala's script, as originally pusblished with his article “The Fastest And Easiest Method For Removing The Orange Mask In Photoshop” on July 31, 2015. It seems howewer, that the original article is not available any longer; One may try a snapshot over on archive.org.

This repo intends to make this script available via homebrew, the missing package manager for macOS.

Installation

Manual Installation

Linux and macOS users store the script somewhere and make it executable: chmod +x negdiv.sh If the script is not stored inside ~/bin, add the directory location to your $PATH variable.

Required: Make sure ImageMagick is installed. Recommended: Fred Weinhaus's autotone script for post-processing.

Homebrew installation

Install the filmtools tap and the negdiv.sh formula. — While ImageMagick will be installed automatically, Fred Weinhaus's autotone script still needs manual installation.

$ brew tap filmtools/filmtools
$ brew install negdiv.sh

Approaching the orange mask

The idea of Antti Penttala's script is to “subtract” the orange color from the typically orange-tinted color negative image. The script first internally resizes a mask image (blank piece of film) to 1×1 pixels, resulting in an “average orange”. It then divides the color values in the frame image by this average orange. After that, the image will be inverted (negated). The resulting positive image is stored with the same filename, but prefixed with pos_ .

Example

This removes the orange found in mask.tiff from myphoto.tiff and inverts the image to positive. The result image can be found under pos_myphoto.tiff

$ negdiv mask.tiff myphoto.tiff
$ ls

myphoto.tiff
pos_myphoto.tiff

Usage

$ negdiv [options ...] maskfile framefile ...

General options

Option Description
-a Use autotone script by Fred Weinhaus to finalize the image
-j Output in jpg format
-p path Output to path instead of current directory
-q Keep quiet

Autotone options

The negdiv.sh script allows to pass its output to Fred Weinhaus' autotone script which is part of Fred's ImageMagick Scripts. They are available free of charge for non-commercial use, ONLY.

However, these options apply when -a is selected:

Option Description
-n none Do not reduce noise
-n auto Use autotone defaults for noise reduction instead of negdiv defaults
-n 2.0 Pass the float value to autotone for noise reduction parameter
-s none Do not sharpen
-s auto Use autotone defaults for sharpening instead of negdiv defaults
-s 3.0 Pass the float value to autotone for sharpening parameter

Legal notes

License: GNU General Public License v2.0

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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

About

Orange mask removal for color negatives, as authored by Antti Penttala

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages