01-28-2010, 10:02 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: iLiad
|
Achieving "zero" boot time
Dear all,
I've got an idea on how to achieve a virtual zero boot time on the iliad (if you use it for reading). Once I run out of battery and the last page that I was displaying just remained printed on the screen. So I thought that instead of the initial boot screen and of the shutdown screens we could implement that the last page remains painted. Maybe we could let a progress bar (like the default one) to signify that the iliad is booting or switching off. In this way, when you switch off your iliad the last page you were reading keeps being displayed and when you reopen your iliad, in the mean time that you restart reading the device boots and gets operational again; achieving a virtual zero boot time. Now, I've got the idea but I have no clue on how to make it work... any of you knows if it is possible? Regards paskino |
01-28-2010, 10:41 AM | #2 | |
Evangelist
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
The best we would do is having the kernel redrawing the last page viewed somewhere in the kernel initialization sequence, but that is rather convoluted. It would be better to change the shutdown scripts to "save" the framebuffer and modify the startup scripts to display it before launching contentLister... I can assist in this one last thing (providing binaries to save the framebuffer and to display an image into the framebuffer), if you are interested in investigating it . |
|
01-28-2010, 06:54 PM | #3 | |
Guru
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
|
Quote:
I have one question. Even if the last framebuffer image is displayed before CL, when CL is launched, that image will be overwritten. Will it? |
|
01-29-2010, 05:31 AM | #4 | |
Enthusiast
Posts: 49
Karma: 10
Join Date: Jul 2006
Location: Paris
Device: TungstenC / hopefully iLi
|
Quote:
But all in all, it's a pretty good idea. |
|
01-29-2010, 07:10 AM | #5 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
If I've understood correctly, it should not be too hard for .pdf files.
Locate the images files in filesystem used in boot and shutdown processes. Change the shutdown process with a script that 1. change those images with a screenshot of the page currently reading, and 2. do a shutdown Page number could be extracted from the manifest. This is a sample python code that creates an image of a pdf file page. It shouldn't be difficult to translate to C or lua. Code:
import gtk import gtk.gdk import poppler def build_cover_pdf_poppler(f): """poppler method. Needs X""" dst = mkstemp()[1] try: doc = poppler.document_new_from_file('file://' + f, None) except: os.unlink(dst) return pag = doc.get_page(0) w, h = map(int, pag.get_size()) pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, w, h) pag.render_to_pixbuf(0, 0, w, h, 1, 0, pb) pb_scaled = pb.scale_simple(TN_W, TN_H, gtk.gdk.INTERP_BILINEAR) pb_scaled.save(dst, 'jpeg', {'quality': TN_QUALITY}) |
01-29-2010, 01:04 PM | #6 | ||
Evangelist
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
Quote:
Alternatively to re-rendering the last opened page, a screenshot can be made by accessing /dev/fb0, and then it's only a matter of saving that screenshot to a known loaction on disk. |
||
02-04-2010, 03:18 AM | #7 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: iLiad
|
Hi,
thanks for the response, I've been cut out of internet for a few days. Now, as far as I understand we could: 1) save the framebuffer of the last displayed page 2) display the framebuffer "when we want" It would be important to display the last page in 2 moments: 1) just before powering down 2) right after the screen is repainted with the boot splash screen. Can we do this? paskino |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wispernet 5 Bars: "Your Kindle is unable to connect at this time" | Richie | Amazon Kindle | 4 | 04-14-2009 03:11 PM |
VistaNews asks "Has eBooks time finally come?" Answers "No" | Donnageddon | News | 7 | 02-19-2009 02:21 AM |
Custom boot logo, "freezing" the screen | guylhem | Sony Reader Dev Corner | 1 | 11-09-2008 11:45 AM |
"Wheel of Time" author Robert Jordan passed away | TadW | Reading Recommendations | 38 | 12-31-2007 11:25 AM |