1. A method for encoding an image, implemented at least in part by a computing device, the method comprising: receiving image data; detecting edges in the image data; selecting at least some of the edges by applying a rate-distortion criterion to each of the edges, the rate-distortion criterion for an edge comprising a priority value for the edge, the priority value based on an edge distortion value, a no-edge distortion value, and a value for a number of bits needed to encode the edge; encoding the selected edges as selected edge information; down-sampling the image data and encoding the down-sampled image as down-sampled image information; and multiplexing the selected edges information and the down-sampled image information.