Mudanças entre as edições de "Exiftool - comandos de escrita"

De Pontão Nós Digitais
Linha 1: Linha 1:
 
Note that quotes are necessary around arguments which contain certain special characters such as >, < or any white space. These quoting techniques are shell dependent, but the examples below will work for most Unix shells. With the Windows cmd shell however, double quotes should be used (eg. -Comment="This is a new comment").
 
Note that quotes are necessary around arguments which contain certain special characters such as >, < or any white space. These quoting techniques are shell dependent, but the examples below will work for most Unix shells. With the Windows cmd shell however, double quotes should be used (eg. -Comment="This is a new comment").
  
exiftool -Comment='This is a new comment' dst.jpg
+
* Write new comment to a JPG image (replaces any existing comment).
Write new comment to a JPG image (replaces any existing comment).
+
  exiftool -Comment='This is a new comment' dst.jpg
  
exiftool -comment= -o newdir -ext jpg .
+
* Remove comment from all JPG images in the current directory, writing the modified images to a new directory.
Remove comment from all JPG images in the current directory, writing the modified images to a new directory.
+
  exiftool -comment= -o newdir -ext jpg .
  
exiftool -keywords=EXIF -keywords=editor dst.jpg
+
* Replace existing keyword list with two new keywords (EXIF and editor).
Replace existing keyword list with two new keywords (EXIF and editor).
+
  exiftool -keywords=EXIF -keywords=editor dst.jpg
  
exiftool -Keywords+=word -o newfile.jpg src.jpg
+
* Copy a source image to a new file, and add a keyword (word) to the current list of keywords.
Copy a source image to a new file, and add a keyword (word) to the current list of keywords.
+
  exiftool -Keywords+=word -o newfile.jpg src.jpg
  
exiftool -exposurecompensation+=-0.5 a.jpg
+
* Decrement the value of ExposureCompensation by 0.5 EV. Note that += with a negative value is used for decrementing because the -= operator is used for conditional deletion (see next example).
Decrement the value of ExposureCompensation by 0.5 EV. Note that += with a negative value is used for decrementing because the -= operator is used for conditional deletion (see next example).
+
  exiftool -exposurecompensation+=-0.5 a.jpg
  
exiftool -credit-=xxx dir
+
* Delete Credit information from all files in a directory where the Credit value was (xxx).
Delete Credit information from all files in a directory where the Credit value was (xxx).
+
  exiftool -credit-=xxx dir
  
exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
+
* Write alternate language for XMP:Description, using HTML character escaping to input special characters.
Write alternate language for XMP:Description, using HTML character escaping to input special characters.
+
  exiftool -xmp:description-de='k&uuml;hl' -E dst.jpg
  
exiftool -all= dst.jpg
+
* Delete all meta information from an image. Note: You should NOT do this to RAW images (except DNG) since proprietary RAW image formats often contain information in the makernotes that is necessary for converting the image.
Delete all meta information from an image. Note: You should NOT do this to RAW images (except DNG) since proprietary RAW image formats often contain information in the makernotes that is necessary for converting the image.
+
  exiftool -all= dst.jpg
  
exiftool -all= -comment='lonely' dst.jpg
+
* Delete all meta information from an image and add a comment back in. (Note that the order is important: -comment='lonely' -all= would also delete the new comment.)
Delete all meta information from an image and add a comment back in. (Note that the order is important: -comment='lonely' -all= would also delete the new comment.)
+
  exiftool -all= -comment='lonely' dst.jpg
  
exiftool -all= --jfif:all dst.jpg
+
* Delete all meta information except JFIF group from an image.
Delete all meta information except JFIF group from an image.
+
  exiftool -all= --jfif:all dst.jpg
  
exiftool -Photoshop:All= dst.jpg
+
* Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC).
Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC).
+
  exiftool -Photoshop:All= dst.jpg
  
exiftool -r -XMP-crss:all= DIR
+
* Recursively delete all XMP-crss information from images in a directory.
Recursively delete all XMP-crss information from images in a directory.
+
  exiftool -r -XMP-crss:all= DIR
  
exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
+
* Set the thumbnail image from specified file (Note: The quotes are necessary to prevent shell redirection).
Set the thumbnail image from specified file (Note: The quotes are necessary to prevent shell redirection).
+
  exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
  
exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
+
* Recursively write JPEG images with filenames ending in _JFR.JPG to the JpgFromRaw tag of like-named files with extension .NEF in the current directory. (This is the inverse of the -JpgFromRaw command of the READING EXAMPLES section above.)
Recursively write JPEG images with filenames ending in _JFR.JPG to the JpgFromRaw tag of like-named files with extension .NEF in the current directory. (This is the inverse of the -JpgFromRaw command of the READING EXAMPLES section above.)
+
  exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
  
exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
+
* Adjust original date/time of all images in directory dir by subtracting one hour and 30 minutes. (This is equivalent to -DateTimeOriginal-=1.5. See Image::ExifTool::Shift.pl for details.)
Adjust original date/time of all images in directory dir by subtracting one hour and 30 minutes. (This is equivalent to -DateTimeOriginal-=1.5. See Image::ExifTool::Shift.pl for details.)
+
  exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
  
exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
+
* Add 3 hours to the CreateDate and ModifyDate timestamps of two images.
Add 3 hours to the CreateDate and ModifyDate timestamps of two images.
+
  exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
  
exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
+
* Shift the values of DateTimeOriginal, CreateDate and ModifyDate forward by 1 hour and 30 minutes for all Canon images in a directory. (The AllDates tag is provided as a shortcut for these three tags, allowing them to be accessed via a single tag.)
Shift the values of DateTimeOriginal, CreateDate and ModifyDate forward by 1 hour and 30 minutes for all Canon images in a directory. (The AllDates tag is provided as a shortcut for these three tags, allowing them to be accessed via a single tag.)
+
  exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
  
exiftool -xmp:city=Kingston image1.jpg image2.nef
+
* Write a tag to the XMP group of two images. (Without the xmp: this tag would get written to the IPTC group since City exists in both, and IPTC is preferred by default.)
Write a tag to the XMP group of two images. (Without the xmp: this tag would get written to the IPTC group since City exists in both, and IPTC is preferred by default.)
+
  exiftool -xmp:city=Kingston image1.jpg image2.nef
  
exiftool -LightSource-='Unknown (0)' dst.tiff
+
* Delete LightSource tag only if it is unknown with a value of 0.
Delete LightSource tag only if it is unknown with a value of 0.
+
  exiftool -LightSource-='Unknown (0)' dst.tiff
  
exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
+
* Set WhiteBalance to Tungsten only if it was previously Auto.
Set WhiteBalance to Tungsten only if it was previously Auto.
+
  exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
  
exiftool -comment-= -comment='new comment' a.jpg
+
* Write a new comment only if the image doesn't have one already.
Write a new comment only if the image doesn't have one already.
+
  exiftool -comment-= -comment='new comment' a.jpg
  
exiftool -o %d%f.xmp dir
+
* Create XMP meta information data files for all images in dir.
Create XMP meta information data files for all images in dir.
+
  exiftool -o %d%f.xmp dir
  
exiftool -o test.xmp -owner=Phil -title='XMP File'
+
* Create an XMP data file only from tags defined on the command line.
Create an XMP data file only from tags defined on the command line.
+
  exiftool -o test.xmp -owner=Phil -title='XMP File'
  
exiftool '-ICC_Profile<=%d%f.icc' image.jpg
+
* Write ICC_Profile to an image from a .icc file of the same name.
Write ICC_Profile to an image from a .icc file of the same name.
+
  exiftool '-ICC_Profile<=%d%f.icc' image.jpg
  
exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
+
* Write structured XMP information. See http://owl.phy.queensu.ca/~phil/exiftool/struct.html for more details.
Write structured XMP information. See http://owl.phy.queensu.ca/~phil/exiftool/struct.html for more details.
+
  exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
  
exiftool -trailer:all= image.jpg
+
* Delete any trailer found after the end of image (EOI) in a JPEG file. A number of digital cameras store a large PreviewImage after the JPEG EOI, and the file size may be reduced significantly by deleting this trailer. See the JPEG Tags documentation for a list of recognized JPEG trailers.
Delete any trailer found after the end of image (EOI) in a JPEG file. A number of digital cameras store a large PreviewImage after the JPEG EOI, and the file size may be reduced significantly by deleting this trailer. See the JPEG Tags documentation for a list of recognized JPEG trailers.
+
  exiftool -trailer:all= image.jpg
  
 
[[Category: exiftool]]
 
[[Category: exiftool]]
 
[[Category: gráfico]]
 
[[Category: gráfico]]

Edição das 13h24min de 19 de junho de 2015

Note that quotes are necessary around arguments which contain certain special characters such as >, < or any white space. These quoting techniques are shell dependent, but the examples below will work for most Unix shells. With the Windows cmd shell however, double quotes should be used (eg. -Comment="This is a new comment").

  • Write new comment to a JPG image (replaces any existing comment).
 exiftool -Comment='This is a new comment' dst.jpg
  • Remove comment from all JPG images in the current directory, writing the modified images to a new directory.
 exiftool -comment= -o newdir -ext jpg .
  • Replace existing keyword list with two new keywords (EXIF and editor).
 exiftool -keywords=EXIF -keywords=editor dst.jpg
  • Copy a source image to a new file, and add a keyword (word) to the current list of keywords.
 exiftool -Keywords+=word -o newfile.jpg src.jpg
  • Decrement the value of ExposureCompensation by 0.5 EV. Note that += with a negative value is used for decrementing because the -= operator is used for conditional deletion (see next example).
 exiftool -exposurecompensation+=-0.5 a.jpg
  • Delete Credit information from all files in a directory where the Credit value was (xxx).
 exiftool -credit-=xxx dir
  • Write alternate language for XMP:Description, using HTML character escaping to input special characters.
 exiftool -xmp:description-de='kühl' -E dst.jpg
  • Delete all meta information from an image. Note: You should NOT do this to RAW images (except DNG) since proprietary RAW image formats often contain information in the makernotes that is necessary for converting the image.
 exiftool -all= dst.jpg
  • Delete all meta information from an image and add a comment back in. (Note that the order is important: -comment='lonely' -all= would also delete the new comment.)
 exiftool -all= -comment='lonely' dst.jpg
  • Delete all meta information except JFIF group from an image.
 exiftool -all= --jfif:all dst.jpg
  • Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC).
 exiftool -Photoshop:All= dst.jpg
  • Recursively delete all XMP-crss information from images in a directory.
 exiftool -r -XMP-crss:all= DIR
  • Set the thumbnail image from specified file (Note: The quotes are necessary to prevent shell redirection).
 exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
  • Recursively write JPEG images with filenames ending in _JFR.JPG to the JpgFromRaw tag of like-named files with extension .NEF in the current directory. (This is the inverse of the -JpgFromRaw command of the READING EXAMPLES section above.)
 exiftool '-JpgFromRaw<=%d%f_JFR.JPG' -ext NEF -r .
  • Adjust original date/time of all images in directory dir by subtracting one hour and 30 minutes. (This is equivalent to -DateTimeOriginal-=1.5. See Image::ExifTool::Shift.pl for details.)
 exiftool -DateTimeOriginal-='0:0:0 1:30:0' dir
  • Add 3 hours to the CreateDate and ModifyDate timestamps of two images.
 exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg
  • Shift the values of DateTimeOriginal, CreateDate and ModifyDate forward by 1 hour and 30 minutes for all Canon images in a directory. (The AllDates tag is provided as a shortcut for these three tags, allowing them to be accessed via a single tag.)
 exiftool -AllDates+=1:30 -if '$make eq "Canon"' dir
  • Write a tag to the XMP group of two images. (Without the xmp: this tag would get written to the IPTC group since City exists in both, and IPTC is preferred by default.)
 exiftool -xmp:city=Kingston image1.jpg image2.nef
  • Delete LightSource tag only if it is unknown with a value of 0.
 exiftool -LightSource-='Unknown (0)' dst.tiff
  • Set WhiteBalance to Tungsten only if it was previously Auto.
 exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
  • Write a new comment only if the image doesn't have one already.
 exiftool -comment-= -comment='new comment' a.jpg
  • Create XMP meta information data files for all images in dir.
 exiftool -o %d%f.xmp dir
  • Create an XMP data file only from tags defined on the command line.
 exiftool -o test.xmp -owner=Phil -title='XMP File'
  • Write ICC_Profile to an image from a .icc file of the same name.
 exiftool '-ICC_Profile<=%d%f.icc' image.jpg
 exiftool -hierarchicalkeywords='{keyword=one,children={keyword=B}}'
  • Delete any trailer found after the end of image (EOI) in a JPEG file. A number of digital cameras store a large PreviewImage after the JPEG EOI, and the file size may be reduced significantly by deleting this trailer. See the JPEG Tags documentation for a list of recognized JPEG trailers.
 exiftool -trailer:all= image.jpg