rotation ans caling of images and its reference