Date: Tue, 04 Jul 2023 00:44:37 +0900 From: Hiroo Ono <hiroo@oikumene.net> To: <freebsd-hackers@freebsd.org> Subject: screenshot for vt(4) Message-ID: <e03b8ef6-c33b-4393-aba3-0811833df3cb@oikumene.net>
next in thread | raw e-mail | index | archive | help
Hello, I made a patch to enable screenshot with vt(4). The patch is here. https://reviews.freebsd.org/D40858 I would like to hear comments and reviews if it can be merged to FreeBSD. When I mentioned it on mastodon, the patch lacked one file, sorry. Please try this if you want to get the patch in one file. http://barleycorn.oikumene.net/ports-patch/0001-Implement-screenshot-with-vt-= 4.patch There are three types of screenshot. 1. vidcontrol -p text < /dev/ttyv0 > screenshot.txt which generate plain text output. 2. vidcontrol -p term < /dev/ttyv0 > screenshot.txt which generate text with ansi escape sequences. 3. vidcontrol -p raw < /dev/ttyv0 > screenshot.raw which generate a raw picture file. The raw file can be converted to PNG via separate program. http://barleycorn.oikumene.net/ports-patch/vtraw2png.tar.gz=20 https://helixteamhub.cloud/individual674914/projects/vtraw2png/repositories/v= traw2png/tree/default It needs libpng (graphics/png). It only supports 32bit depth, but I think it is enough for vt(4). Sorry if=20= I am wrong. I only tested this patch on i386(vga) and amd64(efifb). The vga fb does not=20= support raw output (it does not have vt_fb_ioctl function). Best regards.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e03b8ef6-c33b-4393-aba3-0811833df3cb>