Inkplate 10 not displaying grayscale JPG image

Published Updated 5 years ago

A few days ago I finally received my Inkplate 10 in the mail. I’m using this 10″ e-ink display to show a dashboard of my smart home using Home Assistant. When I started playing around with the device everything seemed to work great and I was able to display the example images (and the ones I prepared) without any issue. However I stumbled upon a problem to display the dashboard image generated by hass-lovelace-kindle-screensaver, a tool I found and used to screenshot my Home Assistant dashboard and render it as a PNG file. I forked and modified this tool to save JPG files instead of PNGs, but the Inkplate just would not display those images. Because the tool is centered around ImageMagick, I used the CLI tools to manually convert the PNG to JPG. But this approach did not work either. By trial and error I found that the Inkplate 10 does not like displaying a grayscale JPG image.

The fix of this issue was quite simple. I needed to convert the file to JPG by ImageMagick, but avoid the grayscale type – however avoiding by not using it directly was not possible when using the PNG hass-lovelace-kindle-screensaver provided out of the box (or my JPG fork for that matter). I actually had to specify the type to be of TrueColor. A simple CLI command for ImageMagick that would be displayed is as follows:

convert output.png -type TrueColor output.jpg

Prepared with that knowledge I was able to fix my fork by just rendering the file not as grayscale, but as a TrueColor JPG image. The output is a colored JPG image which is then displayed in grayscale by the Inkplate. My fork can be found here:

It’s important to note, that the current state of this tool publishes the image on localhost:5000 (or whatever you decide). So it’s not a full qualified path. This does not work for the inkplate, which needs a full path, like localhost:5000/output.jpg. For this reason (and because I am not knowledgeable in node.js) I am using a small nginx sidecar to publish the image which is then retrieved by the inkplate.

Comments

Comments are hosted on comments.itobey.dev. Loading them sets cookies and shares your IP address with that service.