@set_modified_on
def save_persona_image(src, full_dst, **kw):
 log.info(('[1@None] Saving persona image: %s' % full_dst))
 img = ImageCheck(storage.open(src))
 if (not img.is_image()):
  log.error(('Not an image: %s' % src), exc_info=True)
  return
 with storage.open(src, 'rb') as fp:
  i = Image.open(fp)
  with storage.open(full_dst, 'wb') as fp:
   i.save(fp, 'png')
 return True

@ set_modified_on def save_persona_image ( src , full_dst , ** kw ) : log . info ( ( '[1@None] Saving persona image: %s' % full_dst ) ) img = ImageCheck ( storage . open ( src ) ) if ( not img . is_image ( ) ) : log . error ( ( 'Not an image: %s' % src ) , exc_info = True ) return with storage . open ( src , 'rb' ) as fp : i = Image . open ( fp ) with storage . open ( full_dst , 'wb' ) as fp : i . save ( fp , 'png' ) return True
creates a png of a persona header/footer image .