Simple way to remove EXIF data from a JPEG with .NET

.net, exif

Solution

I think reading in the file into a Bitmap object and writing out to a file again should do the trick.

I remember feeling frustrated while doing my "image rotation program" that it removed the EXIF data. But in this case, it's exactly what you want!

Problem

How can I remove all EXIF data from a JPEG image? I found lots of examples on how to read and edit the EXIF data with various libraries, but all I would need is a simple example on how to remove it. It is just for testing proposes, so even the ugliest and hackished approach would be helpful :) I already tried searching for the EXIF start/end markers 0xFFE1 & 0xFFE2. The last one does not exist in my case.

Original source