tell me the best way to remove expif data from images while uploading to a computer?

Does this help, and simplifying. Remember to ensure position is 0 on the input stream when you start reading.

        JpegPatcher _jpegPatcher = new JpegPatcher();
        //Get stream data of uploaded file
        Stream checkStream = fileUpload.PostedFile.InputStream;
        checkStream.Position = 0; // Reset position
        //Pass the stream to remove Exif info
        //Save the file
        string Fpath = Path.Combine(path, fileUpload.FileName);
        using (FileStream outputFileStream = new FileStream(Fpath, FileMode.Create, FileAccess.Write))
            _jpegPatcher.PatchAwayExif(checkStream, outputFileStream);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top