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

Image Built #6

Open
deffel6 opened this issue Apr 12, 2019 · 1 comment
Open

Image Built #6

deffel6 opened this issue Apr 12, 2019 · 1 comment

Comments

@deffel6
Copy link

deffel6 commented Apr 12, 2019

which program i am able to build the Bytearray for the Image ?

Thx. Det

@tolleiv
Copy link

tolleiv commented Nov 26, 2019

Hi, what worked fine for me was sth like:

 from PIL import Image
 im = Image.open('file.png', 'r')
 with open('binary.out','wb') as out:
     out.write(im.convert('1').tobytes())
     out.close()

In case the resolution matches your Micropython code could then just use that to display the image:

 with open("binary.out", "rb") as file:
      buf = bytearray(file.read())
      file.close()
      e.display_frame(buf)

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