Kobo Screensaver Redux

I decided to take another crack at the Kobo Mini screensaver, because I was fed up with the text showing through the image. I realised that if the image has more shades of grey in it then the text doesn't show through, but using more than just black and white resulted in a very washed-out looking image.

After a great deal of messing about I discovered that didder has a remapping function, so I set the palette to a logarithmic range, then remap it to a linear range, and it works almost perfectly! The images look ridiculously dark on the computer screen, but work well on the Kobo.

Some could do with being lightened a little, but I'm happy for now.

dither() {
    name=`basename $1 .jpg`
    convert $1 -background black -gravity center -resize 600x800 -extent 600x800 tmp.png
    didder --brightness 20% --strength 100% \
      -p "0 130 162 180 194 204 212 219 226 231 236 240 244 248 251 255" \
      -r "0 17 34 51 68 85 102 119 136 153 170 187 204 221 238 255" \
      -i tmp.png -o ${name}.png edm stevenpigeon
    rm tmp.png
}