Skip to content

How to get_content for pygame to draw the image? #326

@ArrowLiu234

Description

@ArrowLiu234

I try to get the image from epub, and draw it by pygame.

img = pygame.image.frombytes(epub_image.get_content(), (1152, 1694), 'RGB')

But got the error as 'ValueError: Bytes length does not equal format and resolution size'. I'm sure the size and format are correct.

So please help me to resolve it?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoNeeds more info from the reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions