EXIF 정보를 일괄 삭제

EXIF 정보를 일괄 삭제

수천 개의 JPG 파일에서 EXIF ​​정보를 반복적으로 제거하는 방법은 무엇입니까?

답변1

특정 부분을 삭제하거나 변경하려는 경우 다른 ExifTool 제안이 유용합니다. 그러나 모든 메타데이터를 완전히 제거하려면 매뉴얼 페이지에서 다음 명령을 사용하십시오.

   exiftool -all= dst.jpg
        Delete all meta information from an image.

당신은 또한 사용할 수 있습니다지에 토우, -de 플래그 사용:

   -de    Delete the Exif header entirely.  Leaves  other  metadata
          sections intact.

두 경우 모두 EXIF는 메타데이터의 한 유형일 뿐입니다. 메타데이터의 다른 섹션이 있을 수 있으며 두 프로그램 모두 수행하려는 작업에 따라 삭제 내용의 일부 또는 전부를 보존하는 서로 다른 옵션을 제공합니다. 예를 들어 jhead -purejpg이미지를 렌더링하는 데 필요하지 않은 모든 정보를 제거합니다.

답변2

EXIF 처리 도구exiv2EXIF 데이터를 삭제하는 명령이 있습니다.

exiv2 rm image.jpg

이미지에서 모든 EXIF ​​데이터를 제거합니다.

현재 디렉토리의 모든 JPEG 이미지에서 EXIF ​​데이터를 제거하려면 다음을 사용하십시오.

exiv2 rm *.jpg

현재 디렉터리와 모든 하위 디렉터리의 모든 JPEG 이미지에서 EXIF ​​데이터를 반복적으로 제거하려면 다음을 사용합니다.

find . -type f -iname '*.jpg' | xargs exiv2 rm

먼저 명령을 테스트하는 것이 가장 좋습니다.

어떤 파일이 발견되었는지 확인하려면:

find . -type f -iname '*.jpg' | less

어떤 명령이 실행될지 확인하세요.

find . -type f -iname '*.jpg' | xargs echo exiv2 rm | less

echo이전에 삽입한 것은 명령 exiv2을 실행하는 것이 아니라 인쇄하는 것입니다.

답변3

다음과 같은 일부 오픈 소스 도구를 확인해야 합니다.내보내기 도구. 많은 옵션이 있습니다(exif, xmp, iptc).

exiftool -overwrite_original \
-xmp:Creator='votre nom' \
-xmp:WebStatement='http://creativecommons.org/licenses/by-nc-nd/3.0/' \
-xmp:Rights='Copyright votre nom. This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0  License.' \
-iptc:By-line='votre nom' \
-iptc:CopyrightNotice='Copyright votre nom. This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0  License.' \
-exif:Artist='votre nom' \
-exif:Copyright='Copyright votre nom. This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0  License.' \
votre_fichier.jpg

다음에 해야 할 유일한 일은 파일(jpg)을 나열하고 이러한 작업을 수행하는 작은 스크립트를 작성하는 것입니다. 필드의 내용을 제거하려면 다음 예와 같이 "^"로 설정해야 합니다.

-Software= ^
-ModifyDate= ^
-CreatorTool= ^
-MetadataDate= ^
-Rating= ^
-ImageNumber= ^
-WhiteBalance= ^
-Temperature= ^
-Tint= ^
-IncrementalTemperature= ^
-IncrementalTint= ^
-Exposure= ^
-Shadows= ^
-Brightness= ^
-Contrast= ^
-Saturation= ^
-Sharpness= ^
-LuminanceSmoothing= ^
-ColorNoiseReduction= ^
-ChromaticAberrationR= ^
-ChromaticAberrationB= ^
-VignetteAmount= ^
-VignetteMidpoint= ^
-ShadowTint= ^
-RedHue= ^
-RedSaturation= ^-GreenHue= ^
-GreenSaturation= ^
-BlueHue= ^
-BlueSaturation= ^
-FillLight= ^
-Vibrance= ^
-HighlightRecovery= ^
-Clarity= ^
-Defringe= ^
-HueAdjustmentRed= ^
-HueAdjustmentOrange= ^
-HueAdjustmentYellow= ^
-HueAdjustmentGreen= ^
-HueAdjustmentAqua= ^
-HueAdjustmentBlue= ^
-HueAdjustmentPurple= ^
-HueAdjustmentMagenta= ^
-SaturationAdjustmentRed= ^
-SaturationAdjustmentOrange= ^
-SaturationAdjustmentYellow= ^
-SaturationAdjustmentGreen= ^
-SaturationAdjustmentAqua= ^
-SaturationAdjustmentBlue= ^
-SaturationAdjustmentPurple= ^
-SaturationAdjustmentMagenta= ^
-LuminanceAdjustmentRed= ^
-LuminanceAdjustmentOrange= ^
-LuminanceAdjustmentYellow= ^
-LuminanceAdjustmentGreen= ^
-LuminanceAdjustmentAqua= ^
-LuminanceAdjustmentBlue= ^
-LuminanceAdjustmentPurple= ^
-LuminanceAdjustmentMagenta= ^
-SplitToningShadowHue= ^
-SplitToningShadowSaturation= ^
-SplitToningHighlightHue= ^
-SplitToningHighlightSaturation= ^
-SplitToningBalance= ^
-ParametricShadows= ^
-ParametricDarks= ^
-ParametricLights= ^
-ParametricHighlights= ^
-ParametricShadowSplit= ^
-ParametricMidtoneSplit= ^
-ParametricHighlightSplit= ^
-SharpenRadius= ^
-SharpenDetail= ^
-SharpenEdgeMasking= ^
-ConvertToGrayscale= ^
-ToneCurveName= ^
-CameraProfile= ^
-HasSettings= ^
-CropTop= ^
-CropLeft= ^
-CropBottom= ^
-CropRight= ^
-CropAngle= ^
-CropWidth= ^
-CropHeight= ^
-CropUnit= ^
-HasCrop= ^
-AlreadyApplied= ^
-ToneCurve= ^
-CameraProfile= ^
-ApplicationRecordVersion= ^

답변4

빈센트의Exiftool 사용에 대한 조언매우 좋은. 파일 이름의 단일 인수를 받아들이고 원하는 제거 기능을 실행하는 스크립트를 작성하는 것이 좋습니다. 그런 다음 find파일 세트에서 이 스크립트를 실행하는 데 사용합니다 . 스크립트는 다음과 같습니다.

#!/bin/sh
exiftool -overwrite_original -ExifFieldName=^ [-MoreExifFieldNames=^] $1

로 저장한다고 가정하면 /usr/local/bin/strip_exif.sh다음과 같이 jpeg 파일이 포함된 폴더로 이동하여 불러올 수 있습니다.

find -type f -iname '*.jpg' -exec strip_exif.sh {} \;

편집하다:본 후마템의 답변모든 태그를 제거하는 매개변수와 관련하여 스크립트를 건너뛰고 다음과 같은 조회를 사용할 수 있다고 생각합니다.

find -type f -iname '*.jpg' -exec exiftool -all= {} \;

관련 정보