Simple way to remove EXIF data from a JPEG with .NET
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
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.
.net exif
add a comment |
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.
.net exif
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58
add a comment |
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.
.net exif
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.
.net exif
.net exif
edited Nov 17 '18 at 9:22
Peter Mortensen
13.9k1987114
13.9k1987114
asked Jun 17 '09 at 6:54
marc.dmarc.d
2,93442543
2,93442543
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58
add a comment |
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58
add a comment |
5 Answers
5
active
oldest
votes
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!
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
add a comment |
I first wrote about this using WPF libs in my blog, but this sort of failed since Windows backend calls are a bit messed up.
My final solution is also much quicker which basically byte patches the jpeg in order to remove the exif. Fast and simple :)
[EDIT: Blog post has more updated code]
namespace ExifRemover
{
public class JpegPatcher
{
public Stream PatchAwayExif(Stream inStream, Stream outStream)
{
byte jpegHeader = new byte[2];
jpegHeader[0] = (byte) inStream.ReadByte();
jpegHeader[1] = (byte) inStream.ReadByte();
if (jpegHeader[0] == 0xff && jpegHeader[1] == 0xd8)
{
SkipExifSection(inStream);
}
outStream.Write(jpegHeader,0,2);
int readCount;
byte readBuffer = new byte[4096];
while ((readCount = inStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outStream.Write(readBuffer, 0, readCount);
return outStream;
}
private void SkipExifSection(Stream inStream)
{
byte header = new byte[2];
header[0] = (byte) inStream.ReadByte();
header[1] = (byte) inStream.ReadByte();
if (header[0] == 0xff && header[1] == 0xe1)
{
int exifLength = inStream.ReadByte();
exifLength = exifLength << 8;
exifLength |= inStream.ReadByte();
for (int i = 0; i < exifLength - 2; i++)
{
inStream.ReadByte();
}
}
}
}
}
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. InSkipAppHeaderSection(from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is0xffand if the second is between0xe0and0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be0xe0.
– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
add a comment |
It's too easy, use jhead.exe from here: http://www.sentex.net/~mwandel/jhead/
Make a little batch file if you want e.g.:
jhead.exe -purejpg *.jpg
It will strip all metadata from all jpegs in the same folder.
add a comment |
what you should avoid is to decode and re-encode your images because this will hurt the quality. instead you should find a way to modify only the metadata. i haven't tried it but i think InPlaceBitmapMetadataWriter will do the trick.
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
add a comment |
If it's only the one file have you tried reading into a paint package such as Paint.NET or Paint Shop Pro and resaving it as a new file?
You might need to copy the image to a new file first.
Of course if there are lots of files then this might not be the best approach ;). Though having said that Paint Shop Pro has a batch conversion option which might be worth investigating.
EDIT: It still might be worth investigating batch operations in paint packages (rather than photo manipulation packages as these are more likely to preserve EXIF data) and see if they can be automated. You can then write a script/batch file to process your images.
iik's comment about reading and writing the file degrading the image will apply in this case, but can be minimised by writing with minimal compression.
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1005463%2fsimple-way-to-remove-exif-data-from-a-jpeg-with-net%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
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!
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
add a comment |
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!
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
add a comment |
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!
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!
answered Jun 17 '09 at 8:30
Dave Van den EyndeDave Van den Eynde
12.7k65378
12.7k65378
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
add a comment |
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
1
1
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
i`v gone with this approach for now, thx.
– marc.d
Jun 19 '09 at 8:47
add a comment |
I first wrote about this using WPF libs in my blog, but this sort of failed since Windows backend calls are a bit messed up.
My final solution is also much quicker which basically byte patches the jpeg in order to remove the exif. Fast and simple :)
[EDIT: Blog post has more updated code]
namespace ExifRemover
{
public class JpegPatcher
{
public Stream PatchAwayExif(Stream inStream, Stream outStream)
{
byte jpegHeader = new byte[2];
jpegHeader[0] = (byte) inStream.ReadByte();
jpegHeader[1] = (byte) inStream.ReadByte();
if (jpegHeader[0] == 0xff && jpegHeader[1] == 0xd8)
{
SkipExifSection(inStream);
}
outStream.Write(jpegHeader,0,2);
int readCount;
byte readBuffer = new byte[4096];
while ((readCount = inStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outStream.Write(readBuffer, 0, readCount);
return outStream;
}
private void SkipExifSection(Stream inStream)
{
byte header = new byte[2];
header[0] = (byte) inStream.ReadByte();
header[1] = (byte) inStream.ReadByte();
if (header[0] == 0xff && header[1] == 0xe1)
{
int exifLength = inStream.ReadByte();
exifLength = exifLength << 8;
exifLength |= inStream.ReadByte();
for (int i = 0; i < exifLength - 2; i++)
{
inStream.ReadByte();
}
}
}
}
}
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. InSkipAppHeaderSection(from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is0xffand if the second is between0xe0and0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be0xe0.
– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
add a comment |
I first wrote about this using WPF libs in my blog, but this sort of failed since Windows backend calls are a bit messed up.
My final solution is also much quicker which basically byte patches the jpeg in order to remove the exif. Fast and simple :)
[EDIT: Blog post has more updated code]
namespace ExifRemover
{
public class JpegPatcher
{
public Stream PatchAwayExif(Stream inStream, Stream outStream)
{
byte jpegHeader = new byte[2];
jpegHeader[0] = (byte) inStream.ReadByte();
jpegHeader[1] = (byte) inStream.ReadByte();
if (jpegHeader[0] == 0xff && jpegHeader[1] == 0xd8)
{
SkipExifSection(inStream);
}
outStream.Write(jpegHeader,0,2);
int readCount;
byte readBuffer = new byte[4096];
while ((readCount = inStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outStream.Write(readBuffer, 0, readCount);
return outStream;
}
private void SkipExifSection(Stream inStream)
{
byte header = new byte[2];
header[0] = (byte) inStream.ReadByte();
header[1] = (byte) inStream.ReadByte();
if (header[0] == 0xff && header[1] == 0xe1)
{
int exifLength = inStream.ReadByte();
exifLength = exifLength << 8;
exifLength |= inStream.ReadByte();
for (int i = 0; i < exifLength - 2; i++)
{
inStream.ReadByte();
}
}
}
}
}
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. InSkipAppHeaderSection(from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is0xffand if the second is between0xe0and0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be0xe0.
– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
add a comment |
I first wrote about this using WPF libs in my blog, but this sort of failed since Windows backend calls are a bit messed up.
My final solution is also much quicker which basically byte patches the jpeg in order to remove the exif. Fast and simple :)
[EDIT: Blog post has more updated code]
namespace ExifRemover
{
public class JpegPatcher
{
public Stream PatchAwayExif(Stream inStream, Stream outStream)
{
byte jpegHeader = new byte[2];
jpegHeader[0] = (byte) inStream.ReadByte();
jpegHeader[1] = (byte) inStream.ReadByte();
if (jpegHeader[0] == 0xff && jpegHeader[1] == 0xd8)
{
SkipExifSection(inStream);
}
outStream.Write(jpegHeader,0,2);
int readCount;
byte readBuffer = new byte[4096];
while ((readCount = inStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outStream.Write(readBuffer, 0, readCount);
return outStream;
}
private void SkipExifSection(Stream inStream)
{
byte header = new byte[2];
header[0] = (byte) inStream.ReadByte();
header[1] = (byte) inStream.ReadByte();
if (header[0] == 0xff && header[1] == 0xe1)
{
int exifLength = inStream.ReadByte();
exifLength = exifLength << 8;
exifLength |= inStream.ReadByte();
for (int i = 0; i < exifLength - 2; i++)
{
inStream.ReadByte();
}
}
}
}
}
I first wrote about this using WPF libs in my blog, but this sort of failed since Windows backend calls are a bit messed up.
My final solution is also much quicker which basically byte patches the jpeg in order to remove the exif. Fast and simple :)
[EDIT: Blog post has more updated code]
namespace ExifRemover
{
public class JpegPatcher
{
public Stream PatchAwayExif(Stream inStream, Stream outStream)
{
byte jpegHeader = new byte[2];
jpegHeader[0] = (byte) inStream.ReadByte();
jpegHeader[1] = (byte) inStream.ReadByte();
if (jpegHeader[0] == 0xff && jpegHeader[1] == 0xd8)
{
SkipExifSection(inStream);
}
outStream.Write(jpegHeader,0,2);
int readCount;
byte readBuffer = new byte[4096];
while ((readCount = inStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outStream.Write(readBuffer, 0, readCount);
return outStream;
}
private void SkipExifSection(Stream inStream)
{
byte header = new byte[2];
header[0] = (byte) inStream.ReadByte();
header[1] = (byte) inStream.ReadByte();
if (header[0] == 0xff && header[1] == 0xe1)
{
int exifLength = inStream.ReadByte();
exifLength = exifLength << 8;
exifLength |= inStream.ReadByte();
for (int i = 0; i < exifLength - 2; i++)
{
inStream.ReadByte();
}
}
}
}
}
edited Oct 3 '18 at 11:24
Louis Somers
1,41611736
1,41611736
answered Aug 9 '09 at 19:54
Mikael SvensonMikael Svenson
32.3k46168
32.3k46168
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. InSkipAppHeaderSection(from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is0xffand if the second is between0xe0and0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be0xe0.
– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
add a comment |
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. InSkipAppHeaderSection(from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is0xffand if the second is between0xe0and0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be0xe0.
– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
2
2
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
This worked perfectly while saving using Bitmap didn't quite work for me.
– Sung M. Kim
Apr 5 '15 at 23:28
Mikael, this is a great Solution, but I am curious about something. In
SkipAppHeaderSection (from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is 0xff and if the second is between 0xe0 and 0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be 0xe0.– oscilatingcretin
Oct 7 '18 at 23:47
Mikael, this is a great Solution, but I am curious about something. In
SkipAppHeaderSection (from your blog, not the code posted here), you're iterating over the bytes in pairs and always checking if the first is 0xff and if the second is between 0xe0 and 0xef. How does this indicate the beginning and end of a JPG header? Most curious as to why the first in the pair would always be 0xe0.– oscilatingcretin
Oct 7 '18 at 23:47
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
Been a looong time, but I think I encountered images which had other headers before the exif one, thus I loop until I found the exif one with the correct signature of 0xff 0xe0
– Mikael Svenson
Oct 8 '18 at 5:46
add a comment |
It's too easy, use jhead.exe from here: http://www.sentex.net/~mwandel/jhead/
Make a little batch file if you want e.g.:
jhead.exe -purejpg *.jpg
It will strip all metadata from all jpegs in the same folder.
add a comment |
It's too easy, use jhead.exe from here: http://www.sentex.net/~mwandel/jhead/
Make a little batch file if you want e.g.:
jhead.exe -purejpg *.jpg
It will strip all metadata from all jpegs in the same folder.
add a comment |
It's too easy, use jhead.exe from here: http://www.sentex.net/~mwandel/jhead/
Make a little batch file if you want e.g.:
jhead.exe -purejpg *.jpg
It will strip all metadata from all jpegs in the same folder.
It's too easy, use jhead.exe from here: http://www.sentex.net/~mwandel/jhead/
Make a little batch file if you want e.g.:
jhead.exe -purejpg *.jpg
It will strip all metadata from all jpegs in the same folder.
edited May 22 '12 at 11:28
EdChum
185k34401336
185k34401336
answered Feb 9 '11 at 7:47
RichieRichRichieRich
111
111
add a comment |
add a comment |
what you should avoid is to decode and re-encode your images because this will hurt the quality. instead you should find a way to modify only the metadata. i haven't tried it but i think InPlaceBitmapMetadataWriter will do the trick.
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
add a comment |
what you should avoid is to decode and re-encode your images because this will hurt the quality. instead you should find a way to modify only the metadata. i haven't tried it but i think InPlaceBitmapMetadataWriter will do the trick.
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
add a comment |
what you should avoid is to decode and re-encode your images because this will hurt the quality. instead you should find a way to modify only the metadata. i haven't tried it but i think InPlaceBitmapMetadataWriter will do the trick.
what you should avoid is to decode and re-encode your images because this will hurt the quality. instead you should find a way to modify only the metadata. i haven't tried it but i think InPlaceBitmapMetadataWriter will do the trick.
answered Jun 17 '09 at 8:48
NickNick
2,31211718
2,31211718
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
add a comment |
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
You're right that decoding/re-encoding will hurt quality (to some extent). I think it's up to the poster to decide if it's worth the effort based upon what he needs.
– Dave Van den Eynde
Jun 17 '09 at 9:26
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
i looked into it thx, but it`s way to complicated for my use case.
– marc.d
Jun 19 '09 at 8:48
add a comment |
If it's only the one file have you tried reading into a paint package such as Paint.NET or Paint Shop Pro and resaving it as a new file?
You might need to copy the image to a new file first.
Of course if there are lots of files then this might not be the best approach ;). Though having said that Paint Shop Pro has a batch conversion option which might be worth investigating.
EDIT: It still might be worth investigating batch operations in paint packages (rather than photo manipulation packages as these are more likely to preserve EXIF data) and see if they can be automated. You can then write a script/batch file to process your images.
iik's comment about reading and writing the file degrading the image will apply in this case, but can be minimised by writing with minimal compression.
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
add a comment |
If it's only the one file have you tried reading into a paint package such as Paint.NET or Paint Shop Pro and resaving it as a new file?
You might need to copy the image to a new file first.
Of course if there are lots of files then this might not be the best approach ;). Though having said that Paint Shop Pro has a batch conversion option which might be worth investigating.
EDIT: It still might be worth investigating batch operations in paint packages (rather than photo manipulation packages as these are more likely to preserve EXIF data) and see if they can be automated. You can then write a script/batch file to process your images.
iik's comment about reading and writing the file degrading the image will apply in this case, but can be minimised by writing with minimal compression.
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
add a comment |
If it's only the one file have you tried reading into a paint package such as Paint.NET or Paint Shop Pro and resaving it as a new file?
You might need to copy the image to a new file first.
Of course if there are lots of files then this might not be the best approach ;). Though having said that Paint Shop Pro has a batch conversion option which might be worth investigating.
EDIT: It still might be worth investigating batch operations in paint packages (rather than photo manipulation packages as these are more likely to preserve EXIF data) and see if they can be automated. You can then write a script/batch file to process your images.
iik's comment about reading and writing the file degrading the image will apply in this case, but can be minimised by writing with minimal compression.
If it's only the one file have you tried reading into a paint package such as Paint.NET or Paint Shop Pro and resaving it as a new file?
You might need to copy the image to a new file first.
Of course if there are lots of files then this might not be the best approach ;). Though having said that Paint Shop Pro has a batch conversion option which might be worth investigating.
EDIT: It still might be worth investigating batch operations in paint packages (rather than photo manipulation packages as these are more likely to preserve EXIF data) and see if they can be automated. You can then write a script/batch file to process your images.
iik's comment about reading and writing the file degrading the image will apply in this case, but can be minimised by writing with minimal compression.
edited Jun 17 '09 at 9:01
answered Jun 17 '09 at 8:26
ChrisF♦ChrisF
116k25220293
116k25220293
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
add a comment |
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
unfortunately it is every photo taken with that camera model and maybe also with other models
– marc.d
Jun 17 '09 at 8:53
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
Have you contacted the camera manufacturer - sounds like a bug in their firmware.
– ChrisF♦
Jun 17 '09 at 8:57
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
@ChrisF: Yeah, that's really gonna solve the problem. :P
– Dave Van den Eynde
Jun 17 '09 at 9:48
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
But they might be aware of it and suggest a workaround. Sorry, I should have put that in my original comment.
– ChrisF♦
Jun 17 '09 at 10:13
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
"but can be minimised by writing with minimal compression." actually, this is true, but you'll get a file that's bigger than the original.
– Dave Van den Eynde
Jun 19 '09 at 9:00
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1005463%2fsimple-way-to-remove-exif-data-from-a-jpeg-with-net%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why do you need to do this?
– Eric Smith
Jun 17 '09 at 7:00
because of this stackoverflow.com/questions/1001537/…
– marc.d
Jun 17 '09 at 7:35
Have you considered offering up some rep for this? It looks like straightforward grunt-work.
– Eric Smith
Jun 17 '09 at 7:51
Funny old world... I'm always paranoid that I'm going to accidentally remove the EXIF data.
– Mark Pattison
Jun 17 '09 at 8:58