That is really excellent work. In fact I made something very similar. But I did not go as far as to analyze the image!
Some ideas:
1. Try to use the command pdfimage from pdflib, this can compile all the png images directly into a single PDF. It is much faster than using convert again.
2. Try to quantize the color of the png file. This will reduce the image file size significantly. For e-ink screen the color depth is only 4 - 16, compared to standard 8 bit channel with 256 colors.
3. This method in fact can also work for djvu file. With ddjvu command one can convert certain page into pgm:
'ddjvu -page=%i -scale=%i -format=pgm %s %s' %(pageno, dpi, inputfile, outputfile)
|