View Single Post
Old 06-20-2011, 01:36 AM   #402
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
Hi Ben,

I followed your "cover-on-standby" efforts on the project-page.

Again im stunned how easy and naturally the code looks like, if figured out and done correctly!
Maybe there should be intruduced some kind of settings, so that the use can decide to have the book-cover, or a random image as standby-picture?

I can go for the modifications, but with a holiday on next Thursday it will be next weekend to have it all done and tested.
I think I will start with the mentioned path-var in sim-config and then start with "my" apps (Sudoku and Minesweeper).

Regards
Mark
Hi Mark,

I quite agree about the easy and natural code - once you know what is available! I spent ages going through the DeFsk output, trying various things on my reader. It was so slow! One thing I started doing very early on was to get my reader to output a text file containing printouts of variable contents, etc. Then I discovered code to enumerate all the property and function names of an object. That was a break-through, since I could then work out what code was returning objects, what those objects were, and what could be done with them.

I quickly found the path to the current book - it was already in the PRS+ code, I think. One of my earlier attempts at getting the cover, was to get the thumbnail from the current book node. But that only gave a small image, and this was only generated if the reader was in "thumbnail" mode (I usually use "list" mode). Then the code for making it appear as the stand-by image only worked once after a cold start!

At some point I stumbled over BookUtil.thumbnail.createFileThumbnail. I was surprised when my output file said it had returned an object. I then tried to enumerate it, hoping to see width, height and jpeg properties, and was surprised to see only a dither function. But I had gone over the existing stand-by code enough to recognise this function and therefore what the object was. So I incorporated it into the code and out popped the cover as stand-by image! Needless to say, I was extremely pleased!

I totally agree that this should be incorporated into PRS+ with a setting. I think there are actually four options:

1. Default (blank screen)
2. Current book cover
3. Random image from user folder
4. Current reader display

That fourth one was requested by someone on the PRS+ request thread who was reading a scientific book very slowly and was finding the reader going into standby before they had a chance to turn the page! The only problem with option 4 is that you might think your reader had frozen, since the touchscreen does not respond and buttons don't work. But then if the user had selected that particular option for standby, then they will presumably know what is going on.

And that 4th option is not hard to do. In fact, I had that happen to me a few times over the weekend, when the "try" code failed, and the "catch" code did nothing.

@kartu, is this something you are interested in doing?

Sincerely,
Ben.
BenChen is offline   Reply With Quote