1. A method of resizing a thumbnail image to a larger image without downloading the larger image, comprising: creating a codebook of primitive visual elements extracted from a collection of training images; downsampling an original image to generate a thumbnail image, including extracting resizing parameters; transferring the thumbnail image and the resizing parameters to a remote client; enlarging the thumbnail image to a low-frequency enlarged image at the remote client; and applying the codebook of primitive visual elements to parts of the low-frequency enlarged image to hallucinate a high-frequency version of the enlarged image for emulating the quality of the original image.