Jim Correia put me on to MyCompositeImageRep, and after a fair amount
of head scratching, I came up with the following solution.
Basically, use a subclass of NSCustomImageRep to hold the two images
to be composited or the image to be dimmed, with a drawing method that
draws the two images, or the image and then dims it.
Peter, thanks for the code.
I've also recently discovered this little SourceForge.net project that
allows writing of NSImage IconRef data to .icns files and pasteboards.
It may also help tracking down your problem. Also looks like it may be
useful as a starting point for developing one's own IconRef
compositing utility to replace the broken CompositeIconRef() for 64-bit.