apply-canvas: Use a variable for the color format in prepare().
apply-canvas: Add support for greyscale + don't assume alpha channel.