![]() |
#151 |
Just a Noob
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
|
@dimasic
Yes, it is possible to make a screenshot in Librerator - but on K3 ![]() If you can't do it by yourself, tell me what shortcut you'd like to change, and I'll provide you with a patch. Regards, Kai |
![]() |
![]() |
![]() |
#152 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 10000
Join Date: Apr 2013
Device: Kindle 4NT
|
OK, I've managed to change combination of keys ScreenKB - KEY_FW_UP from "Add Bookmark" to "Make Screenshot" in CRE module by replacing self:addBookmarkCommand() with Screen:screenshot() in corresponding section of crereader.lua. When I press these buttons, it says: "Screenshot is ready in blah-blah-blah", creates file of screenshot in bmp format, but.. it looks like that:
![]() Yes, indeed I tried to open non-valid file, it's only an example. But the screen does not look so ugly. There's message "ERROR: Error reading PDB format. Cannot open document". With other files, which are valid and I can open and read with CRE, the same thing: screen looks OK, but screenshot is not. I tried to modify screen.lua to use function fb2pgm instead of fb2bmp, because it can work with 8bpp framebuffer of K4. It's OK, but picture is inverted. So, it's necessary to add condition for K4 to screen.lua and probably modify fb2bmp and/or fb2pgm functions. |
![]() |
![]() |
Advert | |
|
![]() |
#153 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Quote:
Try to download the attached zip, unpack its content to ../screenshots/ and to replace the function in screen.lua Code:
Screen:screenshot() local format = "bmp" -- or tiff or pgm os.execute("./screenshots/screen2"..format) end Last edited by NuPogodi; 04-14-2013 at 03:29 AM. |
|
![]() |
![]() |
![]() |
#154 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 10000
Join Date: Apr 2013
Device: Kindle 4NT
|
Well, it works on K4NT - all of the formats. But picture is still inverted as in case of calling Screen:fb2pgm() function with 8bpp parameter. Black is white and white is black.
And maybe it's better to modify "Screen:" functions in lua than add three more compiled files? So any advanced user can modify this module without recompiling of C source - to fix some incompatibility or to add his own features. At this moment I have changed Code:
self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, nil) Code:
if Device:getModel() == "Kindle4" then self:fb2pgm("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".pgm", "bzip2 ", 8) else self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, nil) end Last edited by dimasic; 04-14-2013 at 04:41 AM. |
![]() |
![]() |
![]() |
#155 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Quote:
Udachi! Spoiler:
Last edited by NuPogodi; 04-14-2013 at 07:50 AM. Reason: Added: string.char |
|
![]() |
![]() |
Advert | |
|
![]() |
#156 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 10000
Join Date: Apr 2013
Device: Kindle 4NT
|
It does not work at all. Dark grey background with no visible information.
In K4 reading of framebuffer with read() function returns bytes, in which high 4 bits are equal to low 4 bits. So all the bytes look as 00, 11, 22, ... FF. But I can't find the way to translate XX into 0X - and not sure that it should be so in the resulting 8bit pgm. I'm not familiar with Lua and had not programming practice for years, alas. I tried to build array as for 4bpp devices, but with different values; tried to read values byte by byte and divide them with math.floor by 16, but it won't work still. I would appreciate your help, but I'll try to do it by myself. It's interesting task for me. ![]() |
![]() |
![]() |
![]() |
#157 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Just set the high 4 bits to zero - the image is stored 4bits per byte. |
|
![]() |
![]() |
![]() |
#158 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 10000
Join Date: Apr 2013
Device: Kindle 4NT
|
Lua's type conversion made me crazy. But when my code has made screenshot with its own colors, I suddenly noticed that the code is almost identical to the NuPogodi's code (after he made some corrections).
![]() In resulting file the high and the low bits are still equal, so the tiny loss of contrast in highlights should be. But who cares? |
![]() |
![]() |
![]() |
#159 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2012
Device: Kindle 3 WiFi
|
Hi!
Thank you for the great program there is really huge progress compared to a years old version of kpdfviewer I used before. I especially like the possibility to reflow the pdf while mathematic formulas survive. I do however have some questions: 1. I could not find a description of what the (global and local) preferences mean. Could you please add this to the users guide. For example what do "Defect size", "Auto straighten" and "Render quality" actually do? 2. Is it possible to paste the beginning of the next page/column under the end of the current one in reflow mode (e.g. when there are only two lines left on the page, could the next page begin without turning the page)? 3. Can the next page be processed in the background, so that turning pages is faster? 4. With my installation of kindlepdfviewer I got two "books" one for opening the file browser and one for the latest document. Now I have to start KUAL this way and then select one of these options. Is it possible to have such "fake books" again with librerator? Thank you and keep up your great work! |
![]() |
![]() |
![]() |
#160 |
Just a Noob
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
|
@T86
Reflow of pdf/djvu files is not exclusive feature of Librerator. Recent version of KPV support it too. In fact, Librerator was forked after this feature was introduced to KPV. Current version of KPV probably uses newer version of k2pdfopt library. 1. I don’t use reflow all that much. You’d better ask chrox about it (he’s the guy that added it to KPV), or you can try k2pdfopt page: http://www.willus.com/k2pdfopt/ 2. The feature you’re requesting is commonly called “scroll mode”. Librerator and current version of KPV (as far as I know) do not support this. KOReader development team plans to add this feature to KOReader eventually (if I understood correctly). 3. Reflow mode does processing in the background (if multi-threading is on). However, it does take a few seconds, and it only processes next page. You can’t quickly flip through pages in reflow mode. 4. This is covered in this post. Librerator wiki - Known bugs and features mentions this also. Regards, Kai |
![]() |
![]() |
![]() |
#161 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2012
Device: Kindle 3 WiFi
|
@Kai771
Thank you! It seems the solution to 4 is to install kite instead of or in addition to kual. So do I understand you correctly that koreader, kpv and librerator exist in parallel? Until now I had assumed that kpv is no longer maintained but split into koreader (for touch devices) and librerator (for key based navigation)... |
![]() |
![]() |
![]() |
#162 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
JFYI, scroll mode is already implemented in KOReader.
|
![]() |
![]() |
![]() |
#163 |
Just a Noob
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
|
@T86
No, KPV didn't split into koreader and Librerator. Librerator is a fork of KPV. KPV evolved into koreader. Current release of koreader supports only touch devices, but support for all kindles will eventually be added, too. The old codebase, KindlePDFViewer is still maintained, and it's latest release is newer than Librerator-R2. Librerator, as a fork, has some features that KPV doesn't. It's kinda like my version of KPV ![]() Regards, Kai |
![]() |
![]() |
![]() |
#164 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
I might add that Librerator is probably the one in the bunch that is fit for the K4 since good ol' KPV is very centered around use via a full keyboard (i.e. K2,K3,KDX).
|
![]() |
![]() |
![]() |
#165 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 10000
Join Date: Apr 2013
Device: Kindle 4NT
|
A couple of thoughts about BBox feature.
It would be nice to see the "Manually set BBox" and "Remove BBox" items in the "Select Zoom Mode" menu as it is used only with some of zoom modes. It would be nice if in "Fit to content" and "Fit to height" modes narrow page will center on the screen (now it aligns left and looks not very much aesthetic). |
![]() |
![]() |
![]() |
Tags |
application, epub, fb2, pdf, reader |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multi format 'Add' help | fixit4u | Library Management | 1 | 04-21-2012 10:54 AM |
I have a Kindle, can I order books other than Multi-format | chilady1 | Amazon Kindle | 3 | 01-19-2010 04:46 PM |
fictionwise multi-format... except .mobi | demoric | Amazon Kindle | 4 | 10-02-2009 12:05 PM |
Multi-format Reader | theplotthickens | Which one should I buy? | 5 | 05-04-2009 03:19 AM |
Master Format for multi-format eBook Generation? | cerement | Workshop | 43 | 04-01-2009 12:00 PM |