GENPNG(1) LCOV GENPNG(1)

# [NAME](#NAME)

genpng - genpng documentation

# [NAME](#NAME~2)

[**genpng**](#genpng)

Generate an overview image from a source file (internal tool)

[**Manual section**](#Manual)

1

[**Manual group**](#Manual~2)

LCOV 2.0

[**Date**](#Date)

2026-07-07

# [SYNOPSIS](#SYNOPSIS)

```
genpng [ -h | --help ]


 [ -v | --version ]


 [ -t | --tab-size *tabsize* ]


 [ -w | --width *width* ]


 [ -d | --dark-mode ]


 [ -o | --output-filename *output-filename* ]


 source-file
```

# [DESCRIPTION](#DESCRIPTION)

**genpng** creates an overview image for a given source code file of either plain text or .gcov file format.

Note that the *GD.pm* Perl module has to be installed for this script to work (it may be obtained from &lt;http://www.cpan.org&gt;).

Note also that **genpng** is called from within **genhtml** so that there is usually no need to call it directly.

# [OPTIONS](#OPTIONS)

[**-h**, **--help**](#h)

Print a short help text, then exit.

[**-v**, **--version**](#v)

Print version number, then exit.

[**-t** *tab-size*, **--tab-size** *tab-size*](#t)

Use *tab-size* spaces in place of tab.

All occurrences of tabulator signs in the source code file will be replaced by the number of spaces defined by *tab-size* (default is 4).

[**-w** *width*, **--width** *width*](#w)

Set width of output image to *width* pixel.

The resulting image will be exactly *width* pixel wide (default is 80).

Note that source code lines which are longer than *width* will be truncated.

[**-d**, **--dark-mode**](#d)

Use a light-display-on-dark-background color scheme rather than the default dark-display-on-light-background.

[**-o** *filename*, **--output-filename** *filename*](#o)

Write image to *filename*.

Specify a name for the resulting image file (default is *source-file*.png).

# [AUTHOR](#AUTHOR)

Peter Oberparleiter &lt;&lt;Peter.Oberparleiter@de.ibm.com&gt;&gt;

# [SEE ALSO](#SEE_ALSO)

**[lcov(1)](/man/os/lcov/lcov.1) &lt;file://../man/lcov.1.html&gt;**, **[genhtml(1)](/man/os/lcov/genhtml.1) &lt;file://../man/genhtml.1.html&gt;**, **[geninfo(1)](/man/os/lcov/geninfo.1) &lt;file://../man/geninfo.1.html&gt;**, **[gendesc(1)](/man/os/lcov/gendesc.1) &lt;file://../man/gendesc.1.html&gt;**, **[gcov(1)](/man/os/lcov/gcov.1) &lt;file://../man/gcov.1.html&gt;**

&lt;https://github.com/linux-test-project/lcov&gt;

# [Copyright](#Copyright)

2024-2026, LCOV Project

2026-07-07 2.5

---

Document: genpng(1) from lcov 2.5-r1 (Chainguard OS)
Source: https://github.com/linux-test-project/lcov
