Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2019, 12:27 PM   #1
Moonbeam111
Junior Member
Moonbeam111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: none
Question Quick Question

Hi all.

I've looked in the forums and wiki but I can't seem to figure out why that when I reflow text on a PDF that the output is always in B&W. Even when I have checked "Color Rendering" in Koreader settings. I'm using an Android device, Alcatel Tetra.

Any advice or help here? Thanks!
Moonbeam111 is offline   Reply With Quote
Old 07-19-2019, 12:29 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 9,292
Karma: 14769684
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
Possibly because k2pdfopt always outputs B&W pixmaps, or we always request B&W pixmaps from it, I haven't checked, but that seems plausible, given the main target device type .

EDIT: A quick glance at the examples would hint at the former, so, tough luck .

Last edited by NiLuJe; 07-19-2019 at 12:34 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 07-19-2019, 12:33 PM   #3
Moonbeam111
Junior Member
Moonbeam111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
Possibly because k2pdfopt always outputs B&W pixmaps, or we always request B&W pixmaps from it, I haven't checked, but that seems plausible .
Is there not a fix for that? I've used the standalone k2pdfopt before and I know for sure that you can reflow the text while still retaining the color.
Moonbeam111 is offline   Reply With Quote
Old 07-19-2019, 12:35 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 9,292
Karma: 14769684
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
Possibly, but I've lost any and all motivation to work on PDF stuff, because it's a mess that I don't use .

(i.e., patches welcome!)
NiLuJe is offline   Reply With Quote
Old 07-19-2019, 01:45 PM   #5
Frenzie
Guru
Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.
 
Posts: 783
Karma: 135782
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
I like PDF but I have basically no motivation for reflow I'm afraid.
Frenzie is offline   Reply With Quote
Advert
Old 07-19-2019, 02:45 PM   #6
pazos
cosiñeiro
pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.pazos knows what's going on.
 
Posts: 219
Karma: 25242
Join Date: Apr 2014
Device: BQ Cervantes 4
Color output is available since v1.15 https://www.willus.com/k2pdfopt/help/color.shtml

A quick look at our repo searching for dst_color: https://github.com/koreader/libk2pdf...ed_q=dst_color
pazos is offline   Reply With Quote
Old 08-27-2019, 04:12 PM   #7
Moonbeam111
Junior Member
Moonbeam111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: none
Quote:
Originally Posted by pazos View Post
Color output is available since v1.15 https://www.willus.com/k2pdfopt/help/color.shtml

A quick look at our repo searching for dst_color: https://github.com/koreader/libk2pdf...ed_q=dst_color
I'm a little confused guys. I thought KoReader used K2pdfopt engine and K2pdfopt has (as you put it) had color output in reflow since v1.15. So there is no way to reflow the text while retaining color in the output?
Moonbeam111 is offline   Reply With Quote
Old 08-28-2019, 03:36 AM   #8
Frenzie
Guru
Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.
 
Posts: 783
Karma: 135782
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by Moonbeam111 View Post
I'm a little confused guys. I thought KoReader used K2pdfopt engine and K2pdfopt has (as you put it) had color output in reflow since v1.15. So there is no way to reflow the text while retaining color in the output?
Kindles don't need more than 8-bit (or 4-bit really), and neither do Kobos.

I suspect the main loss of color is in the main C files. In settings.c k2settings->dst_color should be set to 1 (or rather allow for a Lua interface override like the DPI property), in functions like k2pdfopt_reflow_bmp and friends I imagine a 24-bit bitmap should be used, and then there's a bunch of presumably much easier to get around stuff in koptinterface.lua and pdfdocument.lua.

Unfortunately however, if I'm going to sit down for a good few hours to work on something I figure my time would be better spent migrating Android to Clang or to see if I can figure out https://github.com/koreader/koreader-base/pull/762 Especially because I know a lot more about the build system than about K2pdfopt.
Frenzie is offline   Reply With Quote
Old 08-28-2019, 11:34 AM   #9
Moonbeam111
Junior Member
Moonbeam111 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2019
Device: none
Quote:
Originally Posted by Frenzie View Post
Kindles don't need more than 8-bit (or 4-bit really), and neither do Kobos.

I suspect the main loss of color is in the main C files. In settings.c k2settings->dst_color should be set to 1 (or rather allow for a Lua interface override like the DPI property), in functions like k2pdfopt_reflow_bmp and friends I imagine a 24-bit bitmap should be used, and then there's a bunch of presumably much easier to get around stuff in koptinterface.lua and pdfdocument.lua.

Unfortunately however, if I'm going to sit down for a good few hours to work on something I figure my time would be better spent migrating Android to Clang or to see if I can figure out https://github.com/koreader/koreader-base/pull/762 Especially because I know a lot more about the build system than about K2pdfopt.
Ok makes sense. I didn't know the issue was so intricate. I assumed I had some settings wrong or was on a build that didn't support color. If you (or anyone else with the knowledge) manages to get color retained in a PDF Reflow, I would greatly appreciate it! However, it looks as if I'll have to accept my reflows in B&W for now.
Moonbeam111 is offline   Reply With Quote
Old 08-28-2019, 12:16 PM   #10
Frenzie
Guru
Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.
 
Posts: 783
Karma: 135782
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
This stuff was originally written in 2011 for Kindle only. Color wasn't just unnecessary, but an unnecessary strain on resources.

Anyway, it shouldn't be super complicated. But I just looked at the code and I don't quite see where the color info is lost. Setting all the mupdf.color stuff to true results in a garbled part of the image, setting color to true in k2pdfopt makes it a nice equal black but still lost. Probably some BB conversion somewhere but boy is the call chain complicated.

On Android you can easily use https://gitlab.com/axet/android-k2pdfopt much like on PC. Most Android devices are also quite fast. KOReader's secret sauce here is doing only one page at a time instead of the whole document. It also has some definite disadvantages but otherwise the reflowing process might take quite a while on your average ereader — especially a 2011 Kindle.
Frenzie is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question on the KT 3G Barbara1955 Amazon Kindle 9 10-22-2013 11:25 AM
Quick question (-_-) Kindle Developer's Corner 2 10-24-2012 01:00 PM
Content Quick GC Question kpfeifle Amazon Kindle 2 12-27-2010 02:26 PM
PRS-600 Okay, quick question.... emonti8384 Sony Reader 13 11-12-2009 06:18 PM
Quick Question. Baz047 Sony Reader 10 12-09-2008 12:25 PM


All times are GMT -4. The time now is 02:15 AM.


MobileRead.com is a privately owned, operated and funded community.