Added compose function to image class