I have a simple operation I need to do in a web application - take an image, check each pixel, and replace it with a certain color while preserving transparency (if it's transparent it doesn't change). Doing this through PHP is extremely slow due to the size of the image; is there an imagemagick command that will have the same result? The input image is a 32-bit png created by imagemagick by disassembling the layers of a PSD file.