Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to process base64_str? #33

Open
stormcoral opened this issue Jul 11, 2024 · 3 comments
Open

how to process base64_str? #33

stormcoral opened this issue Jul 11, 2024 · 3 comments

Comments

@stormcoral
Copy link

Is it possible to directly read in a base64 without saving a temporary file?

@detrin
Copy link
Collaborator

detrin commented Jul 11, 2024

No, I don't think that is possible in this package. Why don't you want to use a temporary file?

Do you think this would solve your issue?

import base64
import io
import jpegio

base64_string = '...'
image_bytes = base64.b64decode(base64_string)
image_buffer = io.BytesIO(image_bytes)
jpg = jpegio.read(image_buffer)

@stormcoral
Copy link
Author

@detrin it will throw an error.

@detrin
Copy link
Collaborator

detrin commented Aug 2, 2024

@detrin it will throw an error.

@stormcoral Can you provide details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants