Red Prince’ Whitewash

Red Prince Whitewash is a simple filter inspired by Etsuro Endo’s popular Eliminate White filter. In fact, their functionality is virtually identical as they both use the same algorithm.

Why did I bother writing a plug-in that someone else has written already? Because Eliminate White was created with Filter Factory, and FF plug-ins are such memory hogs that I cannot use them, except for very small images. So, I wrote my own version in assembly language.

The Whitewash filter works on the Alpha channel of an image (or a layer). The closer to white a pixel is, the more transparent it becomes. It is very similar to the luma key effect, except it uses a simpler algorithm to determine the “whiteness” of the pixel. The above image was produced in Corel Photo-Paint, version 8, using this filter.

I started with two images: A photograph of the Earth taken by the crew of Apollo 17, and a self-portrait of mine. I copied my picture to the clipboard, then pasted it as a new object (called “layer” in Photoshop and most other programs) over the picture of the Earth:

With the eraser tool I deleted the background of my picture. I also deleted parts of the bottom of my shirt to get a smoother transition between my image and that of the Earth.

It was time to use the Whitewash filter, which gave me this:

With the magic wand I clicked on a black pixel in the area surrounding the Earth. This selected the entire area, which I deleted. It now became white. I converted the image into an 8-bit indexed image, and saved it as a GIF file with the white area set transparent. At first I tried to do it without deleting the black area and making black the transparent color, but in the process of RGB to 8-bit conversion some of the black pixels were converted to “near black” which meant not all of the background was transparent.

Just for the heck of it, I used this image to create a seamless tile. Click here to see it. Then use your browser Back key to return here.

Download Red Prince Whitewash

Download

If you would like to use this filter on your own Windows computer, simply download rpwwash.exe (433K) and run it. Then copy the rpWWash.8bf file to your plug-ins directory. If you select the Full install option, you will also get the assembly language source code.

Next time you run your Photoshop or compatible program, the filter will be on the menu as Red Prince / Whitewash Alpha Channel.

Copyright © 2000-2002 Red Prince
All rights reserved