Preliminary implementation of image encoder and reconstruction