bharath venkatesh wrote: > is it possible to cache image , access the image from the cache , > modify the image and store it back in the cache with out having to > store the image in disk using pil.. if so let me know how to do it . > otherwise please suggest a alternative ...
assuming "image" means an image stored in an image interchange format (e.g. JPEG or PNG etc), use PIL together with the StringIO module: from PIL import Image from StringIO import StringIO data = "... png data ..." im = Image.open(StringIO(data)) out = StringIO() im.save(out, format="PNG") data = out.getvalue() </F> _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig