.\" Copyright (c) 2001 Nik Clayton .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: scr2png.1,v 1.2 2001/05/20 14:43:58 nik Exp $ .\" .Dd May 18, 2001 .Dt SCR2PNG 1 .Os .Sh NAME .Nm scr2png .Nd convert a video memory dump to a PNG image .Sh SYNOPSIS .Nm .Op Fl f Ar font-file .Op Fl v .Sh DESCRIPTION The .Nm utility reads a video memory dump, such as that created by the .Xr vidcontrol 1 utility, and converts it to a PNG image, using the font file specified by the user, or a default font if none is specified. .Nm reads from the standard input, and writes to the standard output. .Pp The following options are available: .Bl -tag -width -indent .It Fl f Ar font-file Use the font read from .Ar font-file when rendering characters on to the image. .Nm reads the same font files used by the .Xr vidcontrol 1 utility. The default font file is .Li /usr/share/syscons/fonts/cp850-8x16.fnt . .It Fl v Use a VGA adapter palette. The default colours used by .Nm match those used by many X11 terminal implementations. However, they do not closely match those used by a typical VGA adapter. Use .Fl v and the colours are more likely to match those originally displayed. .El .Pp See .Xr scrshot 1 for information about the input file format expected by .Nm . .Sh RETURN VALUES The .Nm utility exits 0 on success or >0 if an error occurred. .Sh EXAMPLES The command sequence: .Bd -literal -offset indent .Ic vidcontrol -p < /dev/ttyv0 > shot.scr .Ic scr2png < shot.scr > shot.png .Ed .Pp will capture the contents of the first virtual terminal, and redirect the output to the .Li shot.scr file. .Nm then processes this file, and writes the output to .Li shot.png . Of course this could be rewritten as .Bd -literal -offset indent .Ic vidcontrol -p < /dev/ttyv0 \&| scr2png > shot.png .Ed .Pp This example captures a screen shot, and then produces two different PNG images using different fonts. .Bd -literal -offset indent .Ic vidcontrol -p < /dev/ttyv0 > shot.scr .Ic scr2png < shot.scr > shot-1.png .Ic scr2png -f /usr/share/syscons/fonts/cp850-8x14.fnt < shot.scr > shot-2.png .Ed .Sh SEE ALSO .Xr scr2txt 1 , .Xr vidcontrol 1 , .Xr syscons 4 .Sh AUTHORS .An Nik Clayton Aq nik@FreeBSD.org