
Call me old fashioned, but when I remove something from a file, I want a file size the be smaller if not the same size. This leads me to believe that Imagemagick is encoding the data you want stripped away, and is storing it somewhere else in the file. If your image file uses little endian, some adjustments need to be made.ģ) When trying to use ImageMagick to strip exif data, I noticed that I ended up with a larger file than what I started with.

Nikon has information after this which my program truncates.Ģ) Because this is for Nikon format, it assumes big endian byte order.

Normally image programs read up to the first EOI marker found. They encode this data on to the end of the image file by creating a second EOI marker.

Nikon's JPEG format adds somthing to the very end of each file it creates. The code below does the following:ġ) Gets the current orientation of the image.Ģ) Removes all data contained in APP1 (Exif data) and APP2 (Flashpix data) by blanking.ģ) Recreates the APP1 orientation marker and sets it to the original value.Ĥ) Finds the first EOI marker (End of Image) and truncates the file if nessasary.ġ) This program is used for my Nikon camera.
