1. A method, comprising: under control of one or more computing systems comprising one or more processors, detecting a similarity between visual information in an image and information in a first set of primitive visual elements for creating images; determining primal sketch regions in the image, the primal sketch regions including multiple associated primitive patches; filtering the primal sketch regions to obtain primitive patches of the multiple associated primitive patches; removing the primitive patches from the image when the primitive patches are associated with the first set of primitive visual elements; compressing the image receiving the compressed image; decompressing the compressed image; and synthesizing the visual information that was removed, wherein the synthesizing uses a second set of primitive visual elements for creating images, wherein: the first set of primitive visual elements is learned from first training images and the second set of primitive visual elements is learned from second training images that are different from the first training images, and learning the first set of primitive visual elements and learning the second set of primitive visual elements use same learning strategy.