[composer] Fix picture rotation, optimise scaling of rotated pictures to fit in item bounding box