Skip to content

logging HeifFile.data shows input file type bytes rather than heic converted bytes #217

Answered by bigcat88
Barnards asked this question in Q&A
Discussion options

You must be logged in to vote

Can you please elaborate a bit?
content heif_file.data will be equal to jpeg_bytes, as you code just created HeifFile class from provided raw image data(jpeg_bytes)

If you want to get encoded HEIC or AVIF file from jpeg_bytes you need to call heif_file.save("output.heic")

Or you can directly call pillow_heif.encode(mode='RGBA', size=(595,842), data=jpeg_bytes, "output.heic")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Barnards
Comment options

Answer selected by Barnards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants