core/image: implement ImageIO save