]> granicus.if.org Git - imagemagick/blob - www/escape.html
(no commit message)
[imagemagick] / www / escape.html
1 \r
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \r
3   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">\r
5 <head>\r
6   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\r
7   <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>\r
8   <title>ImageMagick: Format and Print Image Properties</title>
9   <meta http-equiv="Content-Language" content="en-US"/>
10   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
11   <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
12   <meta name="Application-name" content="ImageMagick"/>
13   <meta name="Description" content="ImageMagick is a software suite to create, edit, compose, or convert bitmap images in a variety of formats. Use ImageMagick to scale, rotate, shear, distort and transform images."/>
14   <meta name="Application-url" content="http://www.imagemagick.org"/>
15   <meta name="Generator" content="PHP"/>
16   <meta name="Keywords" content="format, print, image, properties, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
17   <meta name="Rating" content="GENERAL"/>
18   <meta name="Robots" content="INDEX, FOLLOW"/>
19   <meta name="Generator" content="ImageMagick Studio LLC"/>
20   <meta name="Author" content="ImageMagick Studio LLC"/>
21   <meta name="Revisit-after" content="2 DAYS"/>
22   <meta name="Resource-type" content="document"/>
23   <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
24   <meta name="Distribution" content="Global"/>
25   <link rel="icon" href="../images/wand.png"/>
26   <link rel="shortcut icon" href="../images/wand.ico"  type="images/x-icon"/>
27   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>\r
28   <style type="text/css" media="all">\r
29     @import url("../www/magick.css");\r
30   </style>\r
31   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
32   <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
33   <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
34   <script type="text/javascript">\r
35     $(document).ready(function() {\r
36       $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({\r
37         'transitionIn'  : 'elastic',\r
38         'transitionOut' : 'elastic',\r
39         'overlayShow'   : false,\r
40         'opacity'       : true\r
41       });\r
42     });\r
43   </script>\r
44 </head>\r
45 \r
46 <body id="www-imagemagick-org">\r
47 <div class="titlebar">\r
48 <a href="../index.html">\r
49   <img src="../images/script.png" alt="[ImageMagick]"\r
50   style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
51 <a href="http://www.networkredux.com">\r
52   <img src="../images/networkredux.png" alt="[sponsor]"\r
53   style="margin: 45px auto; border: 0px; float: left;" /></a>\r
54 <a href="http://www.imagemagick.org/discourse-server/">\r
55   <img src="../images/logo.jpg" alt=""\r
56   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
57 <a href="../index.html">\r
58   <img src="../images/sprite.jpg" alt=""\r
59   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
60 </div>\r
61 \r
62 <div class="westbar">\r
63 \r
64 <div class="menu">
65   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
66 </div>
67 <div class="sep"></div>\r
68 <div class="menu">
69   <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
70 </div>
71 <div class="sub">
72     <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
73 </div>
74 <div class="sub">
75     <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
76 </div>
77 <div class="sub">
78     <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
79 </div>
80 <div class="sep"></div>\r
81 <div class="menu">
82   <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
83 </div>
84 <div class="sub">
85     <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
86 </div>
87 <div class="sub">
88     <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
89 </div>
90 <div class="sub">
91     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
92 </div>
93 <div class="menu">
94   <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
95 </div>
96 <div class="sub">
97     <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
98 </div>
99 <div class="sub">
100     <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
101 </div>
102 <div class="sub">
103     <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
104 </div>
105 <div class="sub">
106     <a title="Program Interface: Magick++" href="../www/magick++.html">Magick++</a>
107 </div>
108 <div class="sep"></div>\r
109 <div  class="menu">
110    <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
111 </div>
112 <div class="sub">
113     <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
114 </div>
115 <div class="sub">
116     <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
117  </div>
118 <div class="menu">
119   <a title="Resources" href="../www/resources.html">Resources</a>
120 </div>
121 <div class="menu">
122   <a title="Architecture" href="../www/architecture.html">Architecture</a>
123 </div>
124 <div class="menu">
125   <a title="Download" href="../www/download.html">Download</a>
126 </div>
127 <div class="sep"></div>\r
128 <div class="menu">
129   <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
130 </div>
131 <div class="sep"></div>\r
132 <div class="menu">
133   <a title="Site Map" href="../www/sitemap.html">Site Map</a>
134 </div>
135 <div  class="sub">
136   <a title="Site Map: Links" href="../www/links.html">Links</a>
137 </div>
138 <div class="sep"></div>\r
139 <div  class="menu">
140   <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
141
142 <div class="sponsbox">
143 <div  class="sponsor">
144    <a title="Sponsor: alaTest.com" href="http://alatest.com">alaTest.com</a><!-- 20110801000300 -->
145 </div>
146 <div  class="sponsor">
147   <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
148 </div>
149 <div  class="sponsor">
150   <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
151 </div>
152 <div  class="sponsor">
153   <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
154 </div>
155 </div>
156 </div>
157 </div>\r
158 \r
159 <div class="eastbar">\r
160   <script type="text/javascript">\r
161   <!--\r
162     google_ad_client = "pub-3129977114552745";\r
163     google_ad_slot = "0574824969";\r
164     google_ad_width = 160;\r
165     google_ad_height = 600;\r
166   //-->\r
167   </script>\r
168   <script type="text/javascript"\r
169     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
170   </script>\r
171 </div>\r
172 \r
173 <div class="main">\r
174 \r
175 <h1>ImageMagick Escapes</h1>
176 <p class="navigation-index"></p>
177
178 <div class="doc-section">
179 <p>Use the <a href="../www/command-line-options.html#format_identify_">-format</a> option to print properties associated with an image in a format of your choosing. You can include the image filename, type, width, height, EXIF data, or other image attributes by embedding special format characters:</p>
180
181 <pre class="text">
182    %b   file size
183    %c   comment
184    %d   directory
185    %e   filename extension
186    %f   filename
187    %g   page geometry
188    %h   current image height in pixels
189    %i   input filename
190    %k   number of unique colors
191    %l   label
192    %m   magick
193    %n   number of scenes
194    %o   output filename
195    %p   page number
196    %q   quantum depth
197    %r   image class and colorspace
198    %s   scene number
199    %t   top of filename
200    %u   unique temporary filename
201    %w   current width in pixels
202    %x   x resolution
203    %y   y resolution
204    %z   image depth
205    %A   image alpha channel
206    %C   image compression type
207    %D   image dispose method
208    %H   page height
209    %W   page width
210    %X   page x offset
211    %Y   page y offset
212    %Q   image compression quality
213    %T   image delay
214    %@   bounding box
215    %#   signature
216    %%   a percent sign
217    \n   newline
218    \r   carriage return
219 </pre>
220
221 <p>Here is a sample command and its output
222 for an image with filename <kbd>bird.miff</kbd> and whose width is 512 and height is 480.</p>
223
224 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>identify -format "%m:%f %wx%h" bird.miff</span><span class='crtout'>MIFF:bird.miff 512x480</span></p>
225 <p>Additional properties are recognized when enclosed in braces:</p>
226
227 <pre class="text">
228    %[base]                base filename
229    %[channels]
230    %[colorspace]
231    %[copyright]
232    %[depth]
233    %[directory]
234    %[extension]
235    %[group]
236    %[height]               original height of image (when it was read in)
237    %[magick]
238    %[max]
239    %[mean]
240    %[min]
241    %[name]
242    %[page]
243    %[scene]
244    %[scenes]
245    %[size]                 original size of image (when it was read in)
246    %[standard-deviation]
247    %[unique]               unique temporary filename
248    %[version]
249    %[width]                original width of image (when it was read in)
250    %[xresolution]
251    %[yresolution]
252 </pre>
253
254 <p>Use <kbd>fx:</kbd> to evaluate <a href="../www/fx.html">FX</a> expressions:</p>
255
256 <pre class="text">
257    %[fx:<em class="arg">expression</em>]
258 </pre>
259
260 <p>Use <kbd>pixel:</kbd> to evaluate a pixel color as defined by the <a href="../www/fx.html">FX</a> expression:</p>
261
262 <pre class="text">
263    %[pixel:<em class="arg">expression</em>]
264 </pre>
265
266 <p>You can also use the following special formatting syntax to print EXIF information contained in the file:</p>
267
268 <pre class="text">
269    %[EXIF:<em class="arg">tag</em>]
270 </pre>
271
272 <p>Choose <em class="arg">tag</em> from the following:</p>
273
274 <pre class="text">
275    *  (print all EXIF tags, in keyword=data format)
276    !  (print all EXIF tags, in tag_number data format)
277    #hhhh (print data for EXIF tag #hhhh)
278    ImageWidth
279    ImageLength
280    BitsPerSample
281    Compression
282    PhotometricInterpretation
283    FillOrder
284    DocumentName
285    ImageDescription
286    Make
287    Model
288    StripOffsets
289    Orientation
290    SamplesPerPixel
291    RowsPerStrip
292    StripByteCounts
293    XResolution
294    YResolution
295    PlanarConfiguration
296    ResolutionUnit
297    TransferFunction
298    Software
299    DateTime
300    Artist
301    WhitePoint
302    PrimaryChromaticities
303    TransferRange
304    JPEGProc
305    JPEGInterchangeFormat
306    JPEGInterchangeFormatLength
307    YCbCrCoefficients
308    YCbCrSubSampling
309    YCbCrPositioning
310    ReferenceBlackWhite
311    CFARepeatPatternDim
312    CFAPattern
313    BatteryLevel
314    Copyright
315    ExposureTime
316    FNumber
317    IPTC/NAA
318    EXIFOffset
319    InterColorProfile
320    ExposureProgram
321    SpectralSensitivity
322    GPSInfo
323    ISOSpeedRatings
324    OECF
325    EXIFVersion
326    DateTimeOriginal
327    DateTimeDigitized
328    ComponentsConfiguration
329    CompressedBitsPerPixel
330    ShutterSpeedValue
331    ApertureValue
332    BrightnessValue
333    ExposureBiasValue
334    MaxApertureValue
335    SubjectDistance
336    MeteringMode
337    LightSource
338    Flash
339    FocalLength
340    MakerNote
341    UserComment
342    SubSecTime
343    SubSecTimeOriginal
344    SubSecTimeDigitized
345    FlashPixVersion
346    ColorSpace
347    EXIFImageWidth
348    EXIFImageLength
349    InteroperabilityOffset
350    FlashEnergy
351    SpatialFrequencyResponse
352    FocalPlaneXResolution
353    FocalPlaneYResolution
354    FocalPlaneResolutionUnit
355    SubjectLocation
356    ExposureIndex
357    SensingMethod
358    FileSource
359    SceneType
360 </pre>
361
362 <p>Surround the format specification with quotation marks to prevent your shell from misinterpreting any spaces and square brackets.</p>
363
364 <p>The following special formatting syntax can be used to print IPTC information contained in the file:</p>
365
366 <pre class="text">
367    %[IPTC:<em class="arg">dataset</em>:<em class="arg">record</em>]
368 </pre>
369
370 <p>Select <em class="arg">dataset</em> and <em class="arg">record</em> from the following:</p>
371
372 <pre class="text">
373     Envelope Record
374       1:00  Model Version
375       1:05  Destination
376       1:20  File Format
377       1:22  File Format Version
378       1:30  Service Identifier
379       1:40  Envelope Number
380       1:50  Product ID
381       1:60  Envelope Priority
382       1:70  Date Sent
383       1:80  Time Sent
384       1:90  Coded Character Set
385       1:100  UNO (Unique Name of Object)
386       1:120  ARM Identifier
387       1:122  ARM Version
388
389     Application Record
390       2:00  Record Version
391       2:03  Object Type Reference
392       2:05  Object Name (Title)
393       2:07  Edit Status
394       2:08  Editorial Update
395       2:10  Urgency
396       2:12  Subject Reference
397       2:15  Category
398       2:20  Supplemental Category
399       2:22  Fixture Identifier
400       2:25  Keywords
401       2:26  Content Location Code
402       2:27  Content Location Name
403       2:30  Release Date
404       2:35  Release Time
405       2:37  Expiration Date
406       2:35  Expiration Time
407       2:40  Special Instructions
408       2:42  Action Advised
409       2:45  Reference Service
410       2:47  Reference Date
411       2:50  Reference Number
412       2:55  Date Created
413       2:60  Time Created
414       2:62  Digital Creation Date
415       2:63  Digital Creation Time
416       2:65  Originating Program
417       2:70  Program Version
418       2:75  Object Cycle
419       2:80  By-Line (Author)
420       2:85  By-Line Title (Author Position) [Not used in Photoshop 7]
421       2:90  City
422       2:92  Sub-Location
423       2:95  Province/State
424       2:100  Country/Primary Location Code
425       2:101  Country/Primary Location Name
426       2:103  Original Transmission Reference
427       2:105  Headline
428       2:110  Credit
429       2:115  Source
430       2:116  Copyright Notice
431       2:118  Contact
432       2:120  Caption/Abstract
433       2:122  Caption Writer/Editor
434       2:125  Rasterized Caption
435       2:130  Image Type
436       2:131  Image Orientation
437       2:135  Language Identifier
438       2:150  Audio Type
439       2:151  Audio Sampling Rate
440       2:152  Audio Sampling Resolution
441       2:153  Audio Duration
442       2:154  Audio Outcue
443       2:200  ObjectData Preview File Format
444       2:201  ObjectData Preview File Format Version
445       2:202  ObjectData Preview Data
446
447     Pre-ObjectData Descriptor Record
448       7:10   Size Mode
449       7:20   Max Subfile Size
450       7:90   ObjectData Size Announced
451       7:95   Maximum ObjectData Size
452
453     ObjectData Record
454       8:10   Subfile
455
456     Post ObjectData Descriptor Record
457       9:10   Confirmed ObjectData Size
458 </pre>
459 </div>
460 \r
461 </div>\r
462 \r
463 <div id="linkbar">\r
464     <span id="linkbar-west">&nbsp;</span>\r
465     <span id="linkbar-center">\r
466       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
467       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
468     </span>\r
469     <span id="linkbar-east">&nbsp;</span>\r
470   </div>\r
471   <div class="footer">\r
472     <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>\r
473     <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
474   </div>\r
475   <div style="clear: both; margin: 0; width: 100%; "></div>\r
476   <script type="text/javascript">\r
477     var _gaq = _gaq || [];\r
478     _gaq.push(['_setAccount', 'UA-17690367-1']);\r
479     _gaq.push(['_trackPageview']);\r
480 \r
481     (function() {\r
482       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
483       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
484       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
485     })();\r
486   </script>\r
487 </body>\r
488 </html>\r