예제 #1
0
 def temp_image(self, image):
     import imaging
     self.set_header("Content-Type", "image/png")     
     self.set_header("Cache-Control", "no-cache")
     if type(image) != str:
         image = imaging.to_string(image)                    
     self.write(image)
     log.info("200 image/png (temporary)")            
예제 #2
0
 def image(self, image):
     import imaging
     self.set_header("Content-Type", "image/png")
     self.set_header("Expires", "Thu, 15 Apr 2050 20:00:00 GMT")
     if type(image) != str:
         image = imaging.to_string(image)            
     self.write(image)
     log.info("200 image/png")