Creating an image manipulation script/process/service for use with the Vanessa ePaper Impee

I’ve started working with Pervasive Displays ePaper displays, and the Vanessa reference design, and wanted to throw out some questions regarding image manipulation.

The ePaper displays require a specific image file (.wif) to be sent to them, its a 1 bit bitmap, and needs to be sized correctly. The files are easily created in Gimp or Photoshop, and there is a python script to convert them to a proper .wif. From there you just need to send the file to you display. You can use curl, and I am also adding a panel to Pitchfork that will allow you to choose an image from your Dropbox, and send it to your impee.

There needs to be an easy way to open some kind of editor, and layout text or images that can then be converted directly to a .wif. I’m envisioning a web based editor that would take text and spit out a .wif, or a way to upload a file, and have a .wif returned. If that were accessible to apps like Pitchfork, it would be extremely useful.

Any of you image editing geniuses out there have ideas?

I don’t have much to contribute on this stage, but I will say that I will be very very happy if anyone cooks something like this up!

I was looking at ImageMagick. I believe the Adafruit learn site uses it to manipulate images… perhaps it could be turned into a wif making tool.

There is an artical about it at

Yep, thats the process that we are using now… just need to automate it somehow.

I wrote an iPhone app for sending pictures to our Vanessa board and did it all in code so it can’t be that hard. I will see if I can post the whole iOS project.

Here is my Objective C code for converting from a 176x264 pixel image to a WIF file. I would then recommend using ImageMagick (or whatever tool is available) to create the image.

// Prepare the bitmap file
uint8_t wif[(height * width) / 8 + 4];
int wif_i = 0;

wif[wif_i++] = (height & 0xFF);
wif[wif_i++] = ((height >> 8) & 0xFF);
wif[wif_i++] = (width & 0xFF);
wif[wif_i++] = ((width >> 8) & 0xFF);

uint8_t byte = 0x0;
uint8_t bit_i = 0;

const uint8_t* bytes = [data bytes];
for (int i = 0; i < [data length]; i += 4) {
    uint8_t r = bytes[i+0];
    uint8_t g = bytes[i+1];
    uint8_t b = bytes[i+2];
    // uint8_t a = bytes[i+3];
    bool bit = ((r + g + b) < 500);
    byte |= bit << bit_i;
    if (bit_i == 8) {
        wif[wif_i++] = byte;
        byte = 0x0;
        bit_i = 0;
    if (wif_i == sizeof(wif)) break;


Nice! That is one step closer. Now I can just make .bmp’s and stick them in my dropbox. Did you do base 64 encoding before you sent the file to the imp in iOS? I found a library on GitHub that does it, so I am crossing my fingers that it works… should have a working Vanessa in a few hours. :slight_smile:

No, I turned off base64 encoding. It gets in the way and serves no purpose.

I posted my crappy iPhone project to our github today.

It allows you to load any photo or take a new photo with the camera and then post it to your Vanessa. The cool bit is It does Macintosh style Atkinson Dithering which looks pretty awesome.

Sweet! Do you mind if I incorporate that into Pitchfork? I assumed you had to base 64 encode, since the agent code does some decoding.

Edit… I see your note about taking that out in the readme…

Now that I am looking at your app… I’m thinking it would be pretty easy to pop up a textview where the user could type, then take a screenshot of that… maybe crop it, and send it through your image manipulation code, and boom, instant “text”.

HI there
Thanks for all of the useful solutions.I am also testing about the image editor and image converting tool recently.And i want to get some free trial from those image processing tool.Thanks for any suggestions.

@Nana111 We are working with Pervasive Displays in the hopes that we can get software written to make these displays really useful. Vanessa boards are in transit to MakeDeck right now, and will be moving on to the manufacturer soon. We will also be submitting an iOS app to Apple in the next few weeks that will allow you to easily send images from an iOS device.

Hi there
Thanks for your nice solutions.Waiting for your good news!