Fix #4258, clean up \OC_Image and improve its unittest