Add decodeImage and decodeAnimation convenience functions.