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