I have just got a Kobo wifi (4-bit display version), rooted it and installed the koboWeather[3] app on it.
Something that I haven't seen anywhere in my research is a better way of displaying images other than using the "/usr/local/Kobo/pickel showpic" method. Even the koboWeather app uses this which causes one fairly major drawback - speed. Converting the pygame surface to a raw image takes very many seconds.
By using the ioctl dumper interposer[2] I decoded the relevant ioctl for displaying an image. Then with the aid of one of the libpng example programs[3] I hacked together a program that can read a PNG image and write it to the display without using pickel.
With the aid of this program the koboWeather app's convert_to_raw function requires only a single line to write a PNG file
which can then be displayed with my new program
which is much faster than converting to a raw image and displaying it.
My program can also display a PNG image which is not full-screen by passing in the x,y coordinates of the top left of the image like this:
In theory this could be used to make apps more interactive since you don't need to refresh the whole screen for every update - something for further investigation.
I've attached the source code and executable - only tested on an eReader wifi with 4-bit display.
[1] https://bitbucket.org/david_weese/kobo-weather-app
[2] https://github.com/kobolabs/Kobo-Rea...e/master/poser
[3] http://www.libpng.org/pub/png/book/sources.html
Something that I haven't seen anywhere in my research is a better way of displaying images other than using the "/usr/local/Kobo/pickel showpic" method. Even the koboWeather app uses this which causes one fairly major drawback - speed. Converting the pygame surface to a raw image takes very many seconds.
By using the ioctl dumper interposer[2] I decoded the relevant ioctl for displaying an image. Then with the aid of one of the libpng example programs[3] I hacked together a program that can read a PNG image and write it to the display without using pickel.
With the aid of this program the koboWeather app's convert_to_raw function requires only a single line to write a PNG file
Code:
def convert_to_raw(surface):
pygame.image.save(surface,"/tmp/img.png");
Code:
call(["rpng-kobo", "/tmp/img.png"])
My program can also display a PNG image which is not full-screen by passing in the x,y coordinates of the top left of the image like this:
Code:
rpng-kobo test.png 300 400
I've attached the source code and executable - only tested on an eReader wifi with 4-bit display.
[1] https://bitbucket.org/david_weese/kobo-weather-app
[2] https://github.com/kobolabs/Kobo-Rea...e/master/poser
[3] http://www.libpng.org/pub/png/book/sources.html