How to remove EXIF data without recompressing the JPEG?

后端 未结 11 2068
梦毁少年i
梦毁少年i 2020-12-02 05:07

I want to remove the EXIF information (including thumbnail, metadata, camera info... everything!) from JPEG files, but I don\'t want to recompress it, as recompressing the J

11条回答
  •  星月不相逢
    2020-12-02 05:29

    Hint for convenience: If you are on Windows, you can apply a REG file to the registry, to install an entry in the context menu, so you can easily remove metadata by right-clicking the file and selecting the command.

    For example (remember to edit the paths to point to where the executables are installed on your computer):


    For JPEG,JPG,JPE,JFIF files: command "Remove metadata"
    (using ExifTool, preserves original file as backup)
    exiftool -all= image.jpg

    JPG-RemoveExif.reg

    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Classes\jpegfile\shell\RemoveMetadata]
    @="Remove metadata"
    [HKEY_CURRENT_USER\Software\Classes\jpegfile\shell\RemoveMetadata\command]
    @="\"C:\\Path to\\exiftool.exe\" -all= \"%1\""
    [HKEY_CURRENT_USER\Software\Classes\jpegfile\shell\RemoveMetadata]
    "Icon"="C:\\Path to\\exiftool.exe,0"
    

    For PNG files: command "Convert to minified PNG"
    (using ImageMagick, changes data overwriting original file)
    convert -background none -strip -set filename:n "%t" image.png "%[filename:n].png"

    PNG-Minify.reg

    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Classes\pngfile\shell\ConvertToMinifiedPNG]
    @="Convert to minified PNG"
    [HKEY_CURRENT_USER\Software\Classes\pngfile\shell\ConvertToMinifiedPNG\command]
    @="\"C:\\Path to\\convert.exe\" -background none -strip -set filename:n \"%%t\" \"%1\" \"%%[filename:n].png\""
    [HKEY_CURRENT_USER\Software\Classes\pngfile\shell\ConvertToMinifiedPNG]
    "Icon"="C:\\Path to\\convert.exe,0"
    

    Related: convert PNGs to ICO in context menu.

提交回复
热议问题