finalize image