switch from socket/file to io lib and added direct access to image pixels without get/set