Added getimage/putimage support with a custom image type.