code: def get_buffer(self, format, output=None):
          
          return self.io.get_buffer(self._get_data(), self.get_header(),
                                    format, output=output)
docs: Get image as a buffer in (format).
          Format should be 'jpeg', 'png', etc.