"Error 0x80070057: The parameter is incorrect" when editing JPEG metadata


When trying to change the metadata on the NYT1 2014 MU69 image taken by New Horizons image that I downloaded from a blog post, I get this error:

An unexpected error is keeping you from appying properties to the file. If you continue to receive this error, you can use the error code to search for help with this problem.

Error 0x80070057: The parameter is incorrect.


Screenshot of Error 0x80070057 on Windows 10

Some observations:

  • The path of the file location is nowhere near 256 characters long
  • The file name is not any of the Windows reserved names
  • The file is not read-only, and I have full read/write permissions for the file.
  • Even if I re-download the image or rename the image, the error still reliably appears every time.
  • I can still edit the metadata on other JPEG files in the same folder just fine, so I don't think this is related to system or hard drive corruption.
  • If I push "Skip", the action completes, but then no metadata is changed.

Possibly related threads that I already looked at:

asked on Super User Jan 2, 2019 by ahiijny • edited Jun 12, 2020 by Community

1 Answer


I don't know the root cause of this error, but it seems to have something to do with the file itself. Using exiftool to repair corrupted EXIF seems to fix the problem. The command looks like this:

exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile bad.jpg

More detail on what this does:

This command deletes all metadata then copies all writable tags that can be extracted from the original image to the same locations in the updated image. The "Unsafe" tag is a shortcut for unsafe EXIF tags in JPEG images which are not normally copied. JPEG images may also contain an ICC color profile which should be preserved. The "ICC_Profile" tag is also marked as unsafe, but is not part of the EXIF so it isn't covered by the "Unsafe" shortcut and must be specified separately.

Note: ExifTool will not modify the JPEG image data.

Advanced: The byte order of the newly created EXIF is set by the value of the ExifByteOrder tag. If ExifByteOrder is not set then the byte order is determined by the ordering of the MakerNotes if they are copied, otherwise big-endian ("MM") byte order is used by default. ExifByteOrder may be set to a specific value to force a particular byte order when creating new EXIF (eg. "-ExifByteOrder=II" for little-endian).

Note also that running the above command on a file named bad.jpg will preserve a copy of the original file under the filename bad.jpg_original.

answered on Super User Jan 2, 2019 by ahiijny • edited Jun 12, 2020 by Community

User contributions licensed under CC BY-SA 3.0