Is that some type of new Kindle?

[Mr C Camacho] picked up an inexpensive digital picture frame hoping to hack into it. He hasn’t had the time to crack open the hardware so that it will do his bidding but he did find a creative way to make it an ebook reader. Using a python script he processes books, creating images of the pages.

The python script, available after the break, takes free books from Project Gutenburg and spits out JPG images. Page turning and bookmarking are not what they ought to be but the process does work. The thought of someone staring at a picture frame on the subway is a bit amusing but we’re sure that sooner or later someone will ask if it’s a new version of the Kindle.

Usage explanation from the developer:

./ book.txt 480 234 16 /usr/share/fonts/truetype/ttf-droid/DroidSansMono.ttf 10 7


1   book.txt       the file name
2   480              native X resolution of picture frame
3   234              native Y resolution of picture frame
4   16                Number of vertical lines of text required
5   blah.ttf        full path and name of a ttf font
6   10                font size to use for lines
7   7                  font size for “page no x” at bottom of page

you’ll have to play with it to get it to work right for your size of screen

(its just a hack ;) )
The main thing to get right first is the font size of the width of the screen
from there you can work out the number of lines you can fit…


import pygameimport sys

# ./ book.txt 480 234 16 /usr/share/fonts/truetype/ttf-droid/DroidSansMono.ttf 10 7



def cleanline(l): l=l.strip('\r') l=l.strip('\n') return l

pygame.init()screen = pygame.display.set_mode((nativeX, nativeY))lines=f.readlines()font = pygame.font.Font(fontname, fontsize)pfont = pygame.font.Font(fontname, pagenosize)

for ln in range(len(lines)/pagelines+1): background = pygame.Surface(screen.get_size()) background = background.convert() background.fill((255, 255, 255))

 for pl in range(16): if (ln*16+pl)<len(lines): line=cleanline(lines[ln*pagelines+pl]) text = font.render(line, 1, (0, 0, 0)) textpos = text.get_rect(x=4,y=pl*(nativeY/pagelines)) background.blit(text, textpos) text=pfont.render("Page "+str(ln+1),1,(0,0,0)) textpos=text.get_rect(x=8,y=nativeY-pagenosize) background.blit(text,textpos) screen.blit(background, (0, 0)) pygame.display.flip() fn="page%#05d" % (ln+1),fn+".jpg")


  1. HIrudinea says:

    Sure as hell cheaper than a Kindle

  2. googfan says:

    might try. 350 is wayy to much for a book reader.

  3. EFH says:

    Kiss your eyes goodbye, though. jpegs of Courier on a 480×234 screen? Holy presyopia, Batman!

  4. hiroe says:

    just get a zippit. they run linux and have batteries and stuff..

  5. Sam says:


    I’m not sure why there’s so much hate for the JPEG format. Yes, it’s lossy, but the degree to which it’s lossy is actually selectable. You can dial up the quality of a JPEG so much that you’d swear it was lossless at first glance.

    Also, the font can be scaled. It doesn’t have to be set at a size proportional to an ordinary monitor.

    Finally, presbyopia is not caused by trying to see tiny things. It is caused by age (it literally translates to “old eye” from Greek and Latin roots). The worst that will probably happen to you is eyestrain and the usual symptoms that come along with it (headache, etc.)

    It’s a hack. If the guy had busted the thing completely to do his dirty work maybe it would be capable of displaying crisp fonts with that snazzy subpixel rendering we’re used to with the wave of a magic firmware rewrite. He shouldn’t have to apologize for hacking a picture frame into an imperfect ebook reader.

  6. Philip says:

    True HaD material, keep it up.

  7. Agent420 says:

    Props for the hack, but personally I can’t stand to read anything of substance in any e format, even on a desktop. I must be old school – nothing beats paper.

  8. Agent420 says:

    and yes, I have a size 13 carbon footprint. steel-toed at that.

  9. Richard says:

    This is an idea I’ve been toying with for a while but been to bloody idle to do anything about…

    Thanks for the kick in the butt to get a move on and actually do it! :-)

  10. grovenstien says:

    Nice i like these picture frame hacks! perhaps some flying leads for the change photo (page) buttons to put them in a more ergonomic position.

    A minor case mod me thinks.

  11. Max says:

    Nice idea. I’m wayyyyy to cheap to buy a kindle.

    I still prefer paper. I have an old laser printer (Samsung ML1200) and print out all my readings for college. Much Cheaper. 3000 pages from a 10 dollar refill. Who said everyone at UC Berkeley is Green. lol.

  12. linuxguymw says:

    I have been using a method like this for my Zune HD for awhile now. I did not use the Python script (I used a program called JpegBook, designed for the PSP but allows custom resolutions). I may give this method a shot though.

  13. osgeld says:

    Cool idea

  14. XBMC^N says:

    Kind of crappy, but definitely hack-y.
    final verdict = WIN.

  15. tehgringe says:

    Is it not better to use gif or png format (unless its not supported by the frame)? – nice hack though.

  16. osgeld says:

    I really dont think the noise from jpg is that big of a issue if done with light compression

    we see text in jpg all the time and it looks fine

  17. nes says:

    I reckon he could do sub-pixel aliasing with a little mod to that script: render the lines three times the size, scale 33% vertically then filter horizontally, taking the R, G and B elements from each group of three to make each new pixel. I believe ImageMagik has a filter for doing exactly that.

    Might make it a bit easier on the eye if low resolution is a problem, and takes advantage of the fact it’s actually a color screen.

  18. googfan says:


    yeah a book on a 2.7″ screen is easy on the eyes.

  19. Illlion says:

    I wrote this idea down in a notepad less than two weeks ago.

    My first thoughts after seeing this was that the bastard stole my idea (Id told someone on IRC)

    My idea was for snapshotting websites (primarily Hackaday) rather than ebooks, for my morning dose of epic hackness.

  20. bbot says:

    Now that’s a hack.

  21. RoboGuy says:



    Neat idea. Useful, too.

  22. lockout says:

    paper-based books are uncompressed. me likey.

  23. EFH says:

    I’m not so much hating on JPEG as hating on reading on low-res LCD (or *any* LCD) and calling it a Kindle substitute. Folks who haven’t seen e-paper are still not getting it, really. The difference in eyestrain level is really incredible. No disrespect for the hack — I did the same kind of thing for my original Palm Pilot a whole lot of years ago — but it ain’t no Kindle.

  24. MS3FGX says:

    This is hardly a new concept, like already mentioned, this is pretty common on handheld game devices like the DS and PSP, and has gone far back to devices as old as the Palm Pilot.

    Of course, there is a bigger problem with this hack than issues of compression, which seems to have been ignored in the original post. Battery powered digital picture frames with screens that large are fairly rare, and if the power cord peeking out of the right corner there is any indication, we won’t be seeing this little guy on the subway anytime soon.

  25. Rael says:

    How do you power it on the bus. I haven’t seen a battery powered picture frame.

  26. Mike D. says:

    You can always use Amtrack. They’ve got plenty of AC outlets and less wackos.

  27. 0bama_sed_'Aks' says:

    he didn’t even write the script? putting a picture of words on a picture frame and calling it a kindle isnt a hack, if he wrote the script then i would agree that there was a hack involved here, but what is going on here is like me buying a picture frame, downloading some porn, downloading a video to gif convertor, converting some frames, loading them on the picture frame, then claiming it as a hack because i made a digital picture frame, which was intended to display family photos, instead display internet porn. all with other peoples code, and no real hacking. but i didnt actually read the story and i understand how difficult it must be to find 3 legitimate hacks per day

  28. Tony Cole says:

    I was so taken with this attempt to beat Amazon, Sony and all of the other eReader makers at their own game, that I posted a short review of his work on my blog.
    I have been dipping into this site here on and off for quite a while, as to be honest, I love people who spend their time trying to make things do something they were never intended to do.
    Personally I havent tried to make any of the superb and silly things I have found here, but just get a tremendous buzz out of what the rest of you produce, and the underlying drive that makes you all do this. Good on ya guys! Keep it up!


    eBookAnoid – Reviewing eReaders, eBooks, eBook Websites ….


  29. Chris says:

    @tony cole

    my name is spelt cAmacho notice the A

    but thanks for the mention!

  30. Chris says:

    @0bama_sed_’Aks’ yes I did write it! its just a python scriptlet 1-2hrs work no biggie…

  31. StephenFalken says:

    @Mr C Camacho

    Great hack, simple, industrious, ingenuity. I surprised that more trolls (hackaday competitors) haven’t torn this to pieces.

  32. Tony Cole says:

    Hi, sorry, I will correct the spelling of your name first thing tomorrow morning. My apologies.



  33. plaes says:

    Project Gutenberg, not GutenbUrg.

  34. Sp`ange says:

    I wonder if that picture frame would support a grayscale jpeg. That would save a little bit of space and might yield better results.

  35. Ricardo says:

    I was wondering myself whether a digital photo frame might make a cheap eBook Reader for developing countries. Some have built-in batteries. I found a free MS Windows program called Bullzip that installs as a printer drive and prints to a set of auto-numbered JPEG pages. It could be good for prototyping photo-frame text display projects. Alternatively, PrimoPDF etc can print to PDF, then use IrfanView (Options, Extract All Frames) to convert PDF to numbered JPEGs.

  36. j says:

    @StephenFalken: so that’s why they are coming…

  37. a1eph says:

    I’m looking for a similar frame to do a similar project…something that is relatively thin and takes batteries. I’m planning on stripping the board and screen out and making my own enclosure. Any ideas for a picture frame? The only good ones I found are quite bulky at the back. I’m looking for something like 7-10″.

  38. a1eph says:

    Also, why not read it portrait like a real book?

  39. Headbonk says:

    I’m surprised that virtually all of the picture frame “hacks” seem to use this trick of just feeding it the right pictures to make it do some other task like being a clock.

    No one seems to have gotten into the firmware of one of these things. Given that picture frames are getting relatively cheap and are starting to interesting features like wifi and touch screen I’d expect to find some interesting firmware replacements. Where is the Rockbox of the picture frames?

    Is it because there is no one platform that is common enough to justify the work or because the processors/chips are non-standard or because the design of these things tends to be so one off and closed that there isn’t an easy opening to flash in a replacement firmware?

    Not that I’m saying reversing a device firmware is easy or anything. It just seems like picture frames are such a great target that some hacker gods would have taken it on by now.

  40. Lane says:

    Has anyone had any luck loading Linux to one of these things (or booting to any OS)?

  41. spiny norman says:


    Surely you mean “especially on a desktop”. If you’re trying to read on a desktop no wonder you hate ebooks.

    It’s much better on a reader or, before these dark ages of alleged smartphones with half-size screens and expensive binding data plan contracts, a cheap “PDA”.

  42. Tony Cole says:

    @ Hildegarde,
    Who were you addressing that question to?
    If it was me, you can best go to my blog and put it in a comment box, then I can contact you and try and answer your question.
    If it was to the guys who run this site (which isnt a WordPress Site), then address it to them in the contact us section……
    Cheers, Tony

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,449 other followers