The code here trusts that there is a web server accessible using HTTP 1.0 requests for getting image files in the format PBM. The code is binary/ascii agnostic as far as the images are concerned, so both types (P1 and P4) are valid and accepted
elbosso/esp8266epaperebookreader
I always wanted to build an ebook reader myself - this variant is one where the rendering happens on a server and the display is controlled by an ESP8266 that fetches the image and displays ist. This is the code for the ESP8266
C++NOASSERTION