Pillow for Micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Sonam Phuntsho
Posts: 6
Joined: Tue Aug 27, 2019 2:33 am

Pillow for Micropython

Post by Sonam Phuntsho » Tue Aug 27, 2019 2:38 am

Hi All,
I am using a Lopy4 which has ESP32 chip. I intend to convernt the image jpeg file to the ASCII and I believe we have to use the Pillow module like we use Pillow in desktop python.

Does the micropython support Pillow? Please help me and advise me the use of pillow module for the micropython.

Thank you

User avatar
Roberthh
Posts: 1572
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pillow for Micropython

Post by Roberthh » Tue Aug 27, 2019 7:16 am

LoPy4 is a product of Pycom Inc (www.pycom.io), and supported by their git repository at https://github.com/pycom/pycom-micropython-sigfox, forum at forum.pycom.io. It is indeed built upon Micropython from this web site, but adds their own hardware support. Being based on the ESP32, you can use the ESP32 firmware from micropython.org, but you will not have LoRa support.
I do not know of any support for Pillow on any of these firmware versions, and it might not be needed in your case. Converting binary data to ASCII is easy, and might not need more than a base64 encoding, which is available in the ubinascii module as ubinascii.b2a_base64() and ubinascii.a2b_base64().

Sonam Phuntsho
Posts: 6
Joined: Tue Aug 27, 2019 2:33 am

Re: Pillow for Micropython

Post by Sonam Phuntsho » Wed Aug 28, 2019 8:17 am

@Roberthh.

Thank you for the reply. Actually now I intend to convert the ascii.text file to the hexadecimal in the micropython. Referred some of the codes but seems it did not work. Any guidance?

Thank you

Post Reply