Date: Sun, 24 Apr 94 16:55:47 -0400
From: Timothy Reed <nobugs!friday!treed>
To: next-icon@gun.com
Subject: Generic Document icon...
Reply-To: treed@gun.com

Hi,
It figures that the floodgates would open on this mailing list as soon as I posted the latest archives.  Better late than never.

I needed to create a generic document icon just like one of those copier machine icons with the folded corner:
<GenericDocument.tiff>

This is alpha'ed outside the image, with a small shadow on the bottom and right, and a little dithering on the diagonal line at the fold.

This is a version of the above, without the shading/dithering and with alpha in the fold itself.  You'll see why in a second:
<GenericDocumentAlphaFold.tiff>

When someone posted a couple of images today, it occurred to me that it should be easy for novices to customize the document icon with images that are relevant to their needs like this:
<FlowerDocument.tiff>

(I'm not sure what need this particular image fills - mission critical flower shop application? -:)

I thought that this looked pretty cool, and it only took 30 seconds.  Here's how:
·	First, you need a paint program that supports most of the different compositing operators - the relevant one here is 'Sin'.  I used Tiffany 2, though WetPaint and Icon both should do it too (but not IconBuilder).
·	Copy the image you want to paste in and the above GenericDocumentAlphaFold.tiff with your paint program.
·	Copy the image to paste into the pasteboard by selecting the entire image with Select All, followed by the Copy command.
·	Set the compositing method to 'In'.  Most programs set this to either 'Copy' or 'Over'.  Setting this to 'In' will cause the pasted image to appear only where there's non-Alpha paint.  That's why I alpha'ed out the fold, since we want the fold part to remain white.
·	Paste the image onto the generic document icon window with the Paste command.
·	Fill in the fold with white paint.  Set the compositing method to 'Copy' or 'Over,' set the color to white in the color panel, select a paint-bucket tool, and click in the fold.  The alpha parts of the fold should fill in with white paint.

You may need to do a little cleanup of the document's black border, and you can fill in a single dark grey line for shadow around the bottom and right sides of the document (for depth and NEXTSTEP-compatible light sourcing).  

If I left white paint in the fold before pasting the image in, I'd have to go in by hand and white out the parts of the fold that I wanted to appear white.  Cleaning up the black border is a lot faster, since using a straight-line tool is easier than a pencil tool.

Tim