'Process the image.'

def process_image(self, image):

    from PIL import Image
    import subprocess
    stream = io.BytesIO(image)
    img = Image.open(stream)
    img.save(self.filepath, 'png')
    ocr = subprocess.Popen(self._command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    out = ocr.communicate()
    if (out[0] != ''):
        self._state = out[0].strip().decode('utf-8')
    else:
        self._state = None
        _LOGGER.warning('Unable    to    detect    value:    %s', out[1].strip().decode('utf-8'))
