Hi Team,
I am trying to use PIL to generate an image from the base64 string and resize that image on the redis docker instance using the below code.
import re
import base64
from io import BytesIO
from PIL import `Image`
def base64_to_image(base64_str, image_path=None):
base64_data = re.sub('^data:image/.+;base64,', '', base64_str)
byte_data = base64.b64decode(base64_data)
image_data = BytesIO(byte_data)
img = Image.open(image_data)
return img
inputShape = [320,320]
image = base64_to_image('<<base64String>>')
image = image.convert('RGB') if image.mode != 'RGB' else image
image = image.resize(inputShape)
The above code is running fine on my windows instance but when I am trying to run the same code on the container created with the redismod (https://hub.docker.com/r/redislabs/redismod), the container gets exits while executing the image resizing line ie. the last line of the code. Please find the exception here error.txt
Please note I have installed Pillow package 8.2.0 on this docker instance and the python version is 3.7.3. Can you please help me with the same as early as possible?
Thanks in advance, Chirag Khanna
Comment From: madolson
@chiragkhanna28 Hey, the the docker you linked is supported by Redis Labs, you might want to consider reaching out to them: support@redislabs.com. Other than that, I don't see any Redis related questions here.
Comment From: chiragkhanna28
Noted @madolson. Thanks, we can close this ticket then.