The following is a very simple tutorial for loading image masks into Photoshop to create interesting edges. This roughly simulates the concept of painting developer onto an exposed image in a traditional darkroom setting.
For the purposes of this tutorial the left image is The Photo and the right image is The Mask.


Open both files in Photoshop.
Go to The Mask and open up the Channels Palette (Window/Channels) if it's not already open. Holding down the Apple Key (or PC equiv.) click on RGB Composite Channel. This will load a selection of everything that is white in the image.

Now invert that selection (Select/Inverse).
Open up the Layers Palette (Window/Layers) if it's not already open.
Click on the Folder icon to Create a New Set.

Then the Mask icon to Apply the Mask you have just created above.

Next focus on The Image. Open up the Layers Palette (Window/Layers) if it's not already open. Reduce the window size of the two images so you achieve something like the image below. Then click and hold on either the image or the Thumbnail and drag it into the other file.

The result should look like the below. You may need to scale The Image to fit.
The strength of using the Layer set is you can then add multiple images, adjustment layers etc into that set without having to apply multiple masks.
Experiment by filling the background layer with a colour or another image. Be sure to turn off or delete the background layer and to save a copy of the resultant file.
© Christopher Young, 2008