PNGTEXTADD


NAME

pngtextadd − add text comments to a PNG image file

SYNOPSIS

pngtextadd [--options] [filename]

DESCRIPTION

pngtextadd reads a PNG image file and adds a text comment to it. A file on the command line is modified in-place

pngtextadd --keyword=Author --text=’Me Myself’ filename.png

Otherwise it reads standard input and writes standard output.

pngtextadd --keyword=Title --text=’A picture’ \
<input.png >output.png

Comments in PNG files consist of a "keyword" which is the type of comment, and the comment text. There are various standardized keywords such as "Title", "Author" and "Copyright" but pngtextadd will add anything.

If your libpng is built with iTXt support then "international" text can be given (in UTF-8). --keyword is still Latin-1 but a language name and language-specific keyword (UTF-8) is possible too.

pngtextadd \
--keyword "Title" \
--lang de \
--lkeyword "Title" \
--text "Something in German" \
filename.png

The idea of pngtextadd is really just to add or update comment fields in a generated image file. Not many image manipulation programs have good support for text comments and some will strip them entirely. With pngtextadd you can add back your name, a title, etc.

Each invocation only sets one comment; you can use a script or Makefile to apply multiple comments with multiple runs before publishing etc.

OPTIONS

--keyword name, -k name

The keyword of the comment to add (Latin-1). If the keyword is already present in the file then its contents are replaced.

--text text, -t text

The text for the comment in Latin-1, or if --lang is used then in UTF-8.

--lkeyword text, -K text

A language-specific translation of the keyword, in UTF-8. This should be used in addition to the plain --keyword. (iTXt support required.)

--lang name

The language code of the comment text. (iTXt support required.)

--compress, -c

Compress the text contents if possible. For a large --text this can save some space in the file. But you might not want to compress a copyright notice or author field, so the text is still visible to a raw grep etc.

--help, -h

Print a brief summary of the command line options.

--version

Print the program version, and exit.

--verbose

Print some extra information. Currently all it does is add the libpng library version number to --verbose.

SEE ALSO

libpng(3)

HOME PAGE

http://user42.tuxfamily.org/pngtextadd/index.html

LICENCE

Copyright 2006, 2007, 2009, 2010 Kevin Ryde

pngtextadd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

pngtextadd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with pngtextadd; see the file COPYING. Failing that, go to http://www.gnu.org/licenses/