Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

iptc(1) [debian man page]

IPTC(1) 							  [FIXME: manual]							   IPTC(1)

NAME
iptc - Utility for viewing and modifying the contents of IPTC metadata in images. SYNOPSIS
iptc [[-q] | [--quiet]] [[-b] | [--backup]] [[-s] | [--sort]] [[-v VALUE] | [--value=VALUE]] [[[-l] | [--list]] [[-L TAGS] | [--list-desc=TAGS]] [[-a TAGS] | [--add=TAGS]] [[-m TAGS] | [--modify=TAGS]] [[-d TAGS] | [--delete=TAGS]] [[-p TAGS] | [--print=TAGS]]] [--help] [--version] [file...] DESCRIPTION
This manual page documents briefly the iptc command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. iptc is a IPTC data editor. You can add, modify and delete ITPC metadata in images. You can also get the value of a particular tag. -q, --quiet Produce less verbose output. -b, --backup Backup any modified files. -s, --sort Sort tags before displaying or saving. --help Display an help message and exit. --version Display an iptc version number and exit. -l, --list List the name of all known tags (i.e. Caption, etc). -L TAG, --list-desc=TAG Print the name and description of TAG. -a TAG, --add=TAG Add new tag with identifier TAG. -m TAG, --modify=TAG Modify tag with identifier TAG (add if not present). -v VALUE, --value=VALUE Value for added/modified tag. -d TAG, --delete=TAG Delete tag with identifier TAG. -p TAG, --print=TAG Print value of tag with identifier TAG. file Files to edit. EXAMPLES
Display the IPTC metadata contained in image.jpg: iptc image.jpg Set caption "Foo" in all jpegs of the current dir: iptc -m Caption -v "Foo" *.jpg Add keyword "vacation" to all jpegs: iptc -a Keywords -v "vacation" *.jpg LICENSE
This manual page was written by Sylvain Le Gall gildor@debian.org for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Lesser General Public License, Version 2.1 or any later version published by the Free Software Foundation; considering as source code all the file that enable the production of this manpage. AUTHOR
Sylvain Le Gall <gildor at-smtp-server debian.org> Author. COPYRIGHT
Copyright (C) 2007 Sylvain Le Gall [FIXME: source] Jan 17, 2007 IPTC(1)

Check Out this Related Man Page

IPTCEMBED(3)								 1							      IPTCEMBED(3)

iptcembed - Embeds binary IPTC data into a JPEG image

SYNOPSIS
mixed iptcembed (string $iptcdata, string $jpeg_file_name, [int $spool]) DESCRIPTION
Embeds binary IPTC data into a JPEG image. PARAMETERS
o $iptcdata - The data to be written. o $jpeg_file_name - Path to the JPEG image. o $spool - Spool flag. If the spool flag is over 2 then the JPEG will be returned as a string. RETURN VALUES
If success and spool flag is lower than 2 then the JPEG will not be returned as a string, FALSE on errors. EXAMPLES
Example #1 Embedding IPTC data into a JPEG <?php // iptc_make_tag() function by Thies C. Arntzen function iptc_make_tag($rec, $data, $value) { $length = strlen($value); $retval = chr(0x1C) . chr($rec) . chr($data); if($length < 0x8000) { $retval .= chr($length >> 8) . chr($length & 0xFF); } else { $retval .= chr(0x80) . chr(0x04) . chr(($length >> 24) & 0xFF) . chr(($length >> 16) & 0xFF) . chr(($length >> 8) & 0xFF) . chr($length & 0xFF); } return $retval . $value; } // Path to jpeg file $path = './phplogo.jpg'; // We need to check if theres any IPTC data in the jpeg image. If there is then // bail out because we cannot embed any image that already has some IPTC data! $image = getimagesize($path, $info); if(isset($info['APP13'])) { die('Error: IPTC data found in source image, cannot continue'); } // Set the IPTC tags $iptc = array( '2#120' => 'Test image', '2#116' => 'Copyright 2008-2009, The PHP Group' ); // Convert the IPTC tags into binary code $data = ''; foreach($iptc as $tag => $string) { $tag = substr($tag, 2); $data .= iptc_make_tag(2, $tag, $string); } // Embed the IPTC data $content = iptcembed($data, $path); // Write the new image data out to the file. $fp = fopen($path, "wb"); fwrite($fp, $content); fclose($fp); ?> NOTES
Note This function does not require the GD image library. PHP Documentation Group IPTCEMBED(3)
Man Page