![]() |
#211 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Waveforms: Ah, thanks for checking, no problem, eink's animations is not their forte anyway ![]() |
|
![]() |
![]() |
![]() |
#212 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.14.0!
Quite a few front-facing changes this time around... On the CLI, the various wfm= suboptions have moved to a global -W, --waveform flag. This means that the syntax for printing images and doing screen refreshes has been altered a tiny bit. On the upside, this is now honored *everywhere*, so you can, for instance, enforce A2 updates when printing text. Because we can, in *addition* to the existing software inversion support, you can now toggle the eInk controller's hardware inversion (i.e., "nightmode"). Really just because we can, as there's almost no performance impact for our current use-cases. Not available on legacy devices (< K5). Performance increase when printing images. Performance increase when decoding images (especially JPG/PNGs). If you suddenly encounter broken/buggy image rendering, give me a shout. Don't crash the CLI when passing a suboption without a value, emit a proper syntax error instead. See the release notes for all the gory details ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#213 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 127
Karma: 30302
Join Date: Oct 2015
Device: KV; PW3 ; PW2 ; k5; KT2
|
Quote:
|
|
![]() |
![]() |
![]() |
#214 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Sol Arkite: Not really, no, the inversion flag is on a per-update basis, it's not an instruction to ask it to invert *every* update until someone asks it not to.
If you *really* wanted to, you'd have to go the interposition way, like the Kobo nightmode hack. There may be a way to tweak the ligl awesome stuff on FW 5.x, too. Hell, it may already be supported but hidden away in an obscure debug-only feature, like there is to disable REAGL. |
![]() |
![]() |
![]() |
#215 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9
Karma: 10000
Join Date: Feb 2019
Device: Kindle 4 NT
|
I made a thing do a thing
![]() Custom Python script to push a section of the screen to the Kindle and use Fbink to display the image KindleTermPV connecting to netcat to send the input events back And Android x86 running in QEMU with video=600x800 passed on the kernel command-line screen.py Code:
import sys import time import paramiko import pyscreenshot as ImageGrab import signal hostname = '192.168.86.125' password = 'pass' username = 'root' def sigint_handler(signum, frame): print('Exiting') time.sleep(2) ftp.close() ssh.close() signal.signal(signal.SIGINT, sigint_handler) ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.connect(hostname, username=username, password=password, compress=False) ssh.exec_command("lipc-set-prop -- com.lab126.powerd preventScreenSaver 1") while True: im = ImageGrab.grab(bbox=(1320, 280, 1920, 1080)) im.save('/tmp/screen.png') ftp=ssh.open_sftp() ftp.put('/tmp/screen.png','/dev/screen.png') stdin, stdout, stderr = ssh.exec_command("fbink -g file=/dev/screen.png -x 0 -y 0") stdout.readlines() Code:
#!/bin/bash sudo netcat -T -l -p 23 | while read -n 1 c; do case "$c" in ($'\033') read -t.001 -n2 r case "$r" in ('[A') xdotool mousemove_relative -- 0 -10 ;; ('[B') xdotool mousemove_relative -- 0 10 ;; ('[D') xdotool mousemove_relative -- -10 0 ;; ('[C') xdotool mousemove_relative -- 10 0 ;; esac;; "") xdotool mousedown 1 && xdotool mouseup 1 ;; esac; done Last edited by parkerlreed; 04-17-2019 at 10:55 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#216 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.15.0!
Remember when I said I wouldn't add image scaling? I lied. ![]() Besides a few bugfixes, this adds scaling & dithering support when printing images ![]() Dithering is cheap, scaling is not. So while this not an excuse to forget to properly preprocess, it does give you more options ![]() |
![]() |
![]() |
![]() |
#217 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
![]() Code:
[root@kindle us]# fbink -c -g file=NiLuJe.out.png,w=600,halign=center,valign=center [FBInk] Detected a Kindle PaperWhite 3 (0G1 -> 0x201) [FBInk] Clock tick frequency appears to be 100 Hz [FBInk] Screen density set to 300 dpi [FBInk] Variable fb info: 1072x1448, 8bpp @ rotation: 3 (Counter Clockwise, 270°) [FBInk] Fontsize set to 24x24 (IBM base glyph size: 8x8) [FBInk] Line length: 44 cols, Page size: 60 rows [FBInk] Vertical fit isn't perfect, shifting rows down by 4 pixels [FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6782976 bytes & line length: 1088 bytes [FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background Displaying image 'NiLuJe.out.png' @ column 0 + 0px, row 0 + 0px (scaling: 600x0, H align: 1, V align: 1, inverted: N, flattened: N, waveform: AUTO, HW dithered: N, SW dithered: N, nightmode: N, skip refresh: N) [root@kindle us]# screenshot Last edited by PoP; 04-20-2019 at 07:07 AM. Reason: linked to what might, one day, become another lie :) |
![]() |
![]() |
![]() |
#218 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Rebember piczat? Well, here is piczat2 using the image scaling new parameters. It is smaller and can resize text to any number of pixels.
announce.sh: Code:
#expects PATH=$PATH:.:.. cd /mnt/us/piczat fbink -c -B graya -q '' #change background color for transparency to show piczat2 x= 250 y= 100 -S 6 -T "piczat2" piczat2 x= 180 y= 300 -S 3 -T "\"Picture That Too\"" piczat2 y= 400 -S 3 -T "Using this Pants Patrol font for ASCII with transparent characters in any size:" piczat2 x= 600 y= 700 -S 1 -T "Size 1" piczat2 x= 500 y= 800 -S 2 -T "Size 2" piczat2 x= 400 y= 900 -S 3 -T "Size 3" piczat2 x= 300 y= 1000 w= 64 -T "16 x 64" piczat2 x= 200 y= 1100 h= 64 -T "64 x 16" piczat2 x= 100 y= 1200 w= 100 h= 50 -T "100 x 50" screenshot |
![]() |
![]() |
![]() |
#219 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Beyond any reason... « 8x8 is already mind-boggingly tiny on a >250dpi screen » and « width must match the width of a C data type in bits », I was thinking that even titty's 5x3 font wasn't small enough for real geeks.
Seeing prompted me to code that 3x3 font using the single atomic "█" character ascii.sh: Code:
fbink -c 3x3 ALT -x 0 -y 0 -S 1 -T "abcdefghijklmnopqrstuvwxyz0123456789" 3x3 ALT -x 0 -y 5 -S 2 -T "abcdefghijklmnopqrstuvwxyz0123456789" 3x3 ALT -x 0 -y 12 -S 3 -T "abcdefghijklmnopqrstuvwxyz0123456789" HumanRights.sh Code:
cd /mnt/us/piczat file="./HumanRights.txt" Y=0 while IFS= read -r line do piczat2 x= 0 y= 0 -Y "$Y" w= 3 h= 3 -F 3x3 -T "$line";Y=$((Y+3)) done <"$file" @NiLuJe, would implementing pixelated scaling be a potential option? ![]() Last edited by PoP; 04-26-2019 at 07:49 PM. Reason: respect upper case J |
![]() |
![]() |
![]() |
#220 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
You'd just need to implement it as a proper bitmap font, as that requirement has since been relaxed to "width/height must *at most* match the width of a C data type"
![]() scientifica is 5x12, for instance ![]() |
![]() |
![]() |
![]() |
#221 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Ah, nice to know. No need to bloat fbink with geeky stuff though. Thanks for its True Type support many alternatives exist, such as the 5 pix tall Zepto, the 4 pix tall Tiny, the 3 pix tall Tinier, and ultimately the 3x3 Font for Nerds. And if our screens were not eink, possibly the 1x5 Millitext sub-pixel font. [EDIT] Furthermore, the incredible 1x3 Bee-Knees sub-pixel font. Last edited by PoP; 04-28-2019 at 10:20 AM. Reason: Bee-Knees |
|
![]() |
![]() |
![]() |
#222 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.16.0!
Mostly a minor maintenance release, with a few tweaks & new features. It also handles the few new PW4 variants that popped up in FW 5.11.2... Let's shine a light on the amazing lab126 codenames they dub their boards & platforms with ![]() |
![]() |
![]() |
![]() |
#223 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
What could I fbink today? ...
![]() Code:
... #SQUASHED text fbink -c T="SQUASHED" i=1;x=0 while [ $i -le ${#T} ]; do t=$(expr substr "$T" $i 1) #next byte of T fbink -t $tt,size=86,left=$x "$t" -M fbink -t $tt,size=86,top=3,left=$(($x + 3)) "$t" -o -M i=$(($i + 1));x=$(($x + 110)) done screenshot #save for posting |
![]() |
![]() |
![]() |
#224 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.17.0!
A fair amount of goodies in this one ![]() Error handling in the CLI tool is now extra verbose. In the OT/TTF font rendering codepath, you can now get information about the line-breaking computation pass (c.f., the docs and the discussion in the Kobo FBInk thread). Also on the OT/TTF side of things, the font size can now be specified as a decimal, which should allow finer-grained control over the final rendering ![]() On the fixed-cell font rendering side of things, Spleen has been updated to 1.0.5, and a couple of Amiga fonts have been imported (Topaz+ A1200 & MicroKnight+), as well as the VGA variant (8x16) of the IBM font. The LF glyph is now always replaced by a space, to account for fonts where it is visible. There's a bunch of minor performance improvements all over, but especially for the fixed-cell font rendering. Of particular interest to users of legacy (< K4) Kindle devices (hi, @PoP! ![]() The most visible example I could find was overlay mode, in the fixed-cell font rendering, with an odd font scaling multiplier. It'd lead to bogus colors on the edges of glyphs. (While it affected more stuff, the most common codepaths were using a couple of workarounds to paper over the underlying issue ;p. This release fixes it for good). |
![]() |
![]() |
![]() |
#225 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.18.0!
A few fixes, most importantly the massive breakage on some specific recent Kindle variants, and added the possibility of specifying OT/TTF font size in pixels (which is how I'm drawing the icons in MRPI ![]() |
![]() |
![]() |
![]() |
Tags |
eips, fbink |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBInk: A small tool/library to print crap on your screen! | NiLuJe | Kobo Developer's Corner | 311 | 06-20-2025 01:19 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 |