added C interface of image transformation