pnginfo #13901
pnginfo
#13901
-
I use the API to generate image data and save the returned base64 images through "image=Image. open (io. BytesIO (base64. b64decode (images [0]. split (", ", 1) [0]))". There is a problem now, I am unable to read the saved image information. Is there any way to do so |
Beta Was this translation helpful? Give feedback.
Answered by
missionfloyd
Nov 8, 2023
Replies: 1 comment 1 reply
-
Save it like this instead. with open("output.png", "wb") as f:
f.write(base64.b64decode(images[0])) This will save the file as-is instead of re-encoding it. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AIjie-sen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save it like this instead.
This will save the file as-is instead of re-encoding it.