Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2021, 07:54 PM   #226
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Released v1.23.2!

Besides some developer documentation updates, this ones includes a couple of significant fixes, including a massive OOB write in the OT codepath when horizontal padding was enabled, which could cause Very Bad Things (TM) to happen.
I also finally squashed a nasty line-fitting issue in the OT codepath.
NiLuJe is offline   Reply With Quote
Old 03-25-2021, 10:17 PM   #227
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by NiLuJe View Post
Released v1.23.2!

Besides some developer documentation updates, this ones includes a couple of significant fixes, including a massive OOB write in the OT codepath when horizontal padding was enabled, which could cause Very Bad Things (TM) to happen.
I also finally squashed a nasty line-fitting issue in the OT codepath.
The --help flag is quite welcome, thanks. It was useful to have the documentation printed out when you wanted it, but each time you made an error, you set the wrong options .... well, not ideal.
The docs included in the binary are very complete, that's for sure though
NiMa is offline   Reply With Quote
Advert
Old 07-11-2021, 02:08 PM   #228
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,065
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
Quote:
Originally Posted by NiLuJe View Post
my current rescale + letterbox + grayscale + dither pass of choice looks something like this:

Code:
convert input.png -colorspace Lab -filter LanczosSharp -distort Resize 1080x1429 -colorspace sRGB -background black -gravity center -extent 1080x1429! -grayscale Rec709Luminance -colorspace sRGB -dither Riemersma -remap eink_cmap.gif -quality 75 png:out.png
1080x1429 being the effective resolution of an H2O .

With the cmap attached here.
NiLuJe,

Can you please explain these options a bit more?
1) I tried dithering manga files produced by Kindle Comic Converter with Riemersma and Floyd-Steinberg dithering. I feel like Floyd-Steinberg produces slightly more grainy images overall, but the gradient look much smoother. Is it acceptable by Kindle?
2) Do I have to apply all these options if I only want to add dithering? For example, can I skip filtering? What's the difference between resize and extent? What is gravity?
3) Some of my input files are actually jpg. Should I still convert them to png? Is it bad if I save them as jpg?
4) Why are there two mentions of colorspace? First is Lab, another one is sRGB
5) I have a different one-liner to convert images (I think I found it when I was converting screensavers). It has "-define png:color-type=0 -define png:bit-depth=8". Should I apply these too?
mergen3107 is offline   Reply With Quote
Old 07-11-2021, 02:33 PM   #229
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,065
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
I found about Riemersma here: https://www.compuphase.com/riemer.htm
It mentions that better results are obtained with an “optimized palette”. Do you know what this would be?
mergen3107 is offline   Reply With Quote
Old 07-11-2021, 04:41 PM   #230
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
1/ Personal preference, FS is perfectly fine, I just tend to prefer Riemersma, as it tends to look slightly more organic .

2/ What filtering? ^^ The bg/extent/gravity triplet's sole purpose is letterboxing, because I abhor stretching.

3/ Any kind of input is fine. JPG as an output is *NOT* .

4/ To do scaling in a linear color space. c.f., the IM documentation.

5/ Nope.
NiLuJe is offline   Reply With Quote
Advert
Old 07-11-2021, 05:23 PM   #231
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,065
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
@NiLuJe
Thank you very much!
By filtering I mean “ -filter LanczosSharp”
mergen3107 is offline   Reply With Quote
Old 07-11-2021, 05:38 PM   #232
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Oh, that's the Resize filter, so, yeah, kind of important (unless you don't actually need scaling, in which case, drop the distort, too) .

Last edited by NiLuJe; 07-11-2021 at 05:57 PM.
NiLuJe is offline   Reply With Quote
Old 07-11-2021, 05:50 PM   #233
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,065
Karma: 4234828
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
@NiLuJe
Thank you very much! Your kind help is priceless!
mergen3107 is offline   Reply With Quote
Old 07-19-2021, 05:36 PM   #234
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Okay I *may* finally be getting what you meant about Riemersma: it appears to be broken as all hell in current IM versions.

No time to dig into this further, so, yeah, if you get weird clipping or banding, switch to FS .
NiLuJe is offline   Reply With Quote
Old 08-02-2021, 08:06 AM   #235
olup
Junior Member
olup began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2015
Device: kobo GLO HD
Questions

Hey, I am loving your FBINK, and using it to fullfill my longtime dream to build an eink typewriter out of my old GLO. So a big thanks for that.

For now, I am using a node.js app that controls fbink cli throught ssh. This works pretty well, and will end up in a pi 0 with a blutooth keyboard. However, I have had some trouble to understand some advanced use cases.

Like, is there in the CLI a way to pipe some raw data to display on an area without relying to an image on the file-system ?

And more obscurely, I understand your lib will not provide means to manage rotation. Is tehre documented ways to have those kind of kobos interpret the frame-buffer at 90° ?

Thanks for your lights,

Olup
olup is offline   Reply With Quote
Old 08-02-2021, 11:17 AM   #236
olup
Junior Member
olup began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2015
Device: kobo GLO HD
Oh, also I wondered how I could pass on multiple string at once to fbink. I maintain a shadow matrix of letter to update only the changed one. But when big parts of the screen changes, I call fbink for each character on screen, and all those calls sent at the same time are prone to do weird stuff. Should I revise my logic or is there a way ? With demonized call maybe ?
olup is offline   Reply With Quote
Old 08-03-2021, 04:34 PM   #237
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by olup View Post
Like, is there in the CLI a way to pipe some raw data to display on an area without relying to an image on the file-system ?
Nope, that's API only.

Quote:
Originally Posted by olup View Post
And more obscurely, I understand your lib will not provide means to manage rotation. Is tehre documented ways to have those kind of kobos interpret the frame-buffer at 90° ?
Not really, but there's probably a saner method of doing what you're attempting to? (as in, actually rotate the framebuffer w/ fbdepth or something, depending on *why*, exactly, you think you need do to that?)

Quote:
Originally Posted by olup View Post
Oh, also I wondered how I could pass on multiple string at once to fbink. I maintain a shadow matrix of letter to update only the changed one. But when big parts of the screen changes, I call fbink for each character on screen, and all those calls sent at the same time are prone to do weird stuff. Should I revise my logic or is there a way ? With demonized call maybe ?
You can pass multiple strings, but it will result in multiple refreshes, so you're more or less only saving a `fork`.
You could do something saner via the API, a temporary no_refresh switch for the batch of draw calls and fbink_grid_refresh and/or fbink_refresh on the final dirty region (àla InkVT).

TL;DR: The CLI is not really geared towards this sort of the stuff, but the API is .
NiLuJe is offline   Reply With Quote
Old 08-06-2021, 05:48 AM   #238
olup
Junior Member
olup began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2015
Device: kobo GLO HD
Thank you for this ! Ok, I might use the library then. I am not at ease with c or c++ but could work with golang. Do you recommend the V2 bindings ? Or the V1 (I know you are not the author of them but if you have a clue). What about the python one ? Thanks
olup is offline   Reply With Quote
Old 08-06-2021, 06:34 PM   #239
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: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The V1 Go bindings aren't up to date, so, that'd be a no . I haven't hit the "merge" button on the latest update of the V2 bindings, but the code is there and up to date.

As for the rest, it's entirely up to which language you actually prefer . (The Python/Lua bindings are currently pinned to master, though, pending a release, which is itself pending free time to actually finish some stuff).
NiLuJe is offline   Reply With Quote
Old 08-06-2021, 11:34 PM   #240
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 860
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
The V1 bindings are deprecated. I should probably archive the repo.

I've let the V2 bindings rot a bit, although NiLuJe has been sort of keeping them up to date with PR's that I haven't merged (sorry).

None of my current projects use it anymore, so I'm afraid I haven't had much interest keeping the bindings updated. That and the FBInk API is a bit of a PITA to create bindings for.
sherman is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura HD Small tool for filling book library in Kobo Aura Paxerus Kobo Developer's Corner 2 12-31-2013 07:05 PM
Small print Broadback Conversion 12 12-12-2011 02:31 PM
Small Tool to change book order (PRS-x50) goaspy Sony Reader 113 10-14-2011 03:28 PM
small print breezeman Introduce Yourself 13 07-03-2011 09:02 AM


All times are GMT -4. The time now is 04:53 PM.


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