Clear EXIF metadata from images

Hi all,
I want to be able to clear metadata from some images before I upload them to a website.
Is there a way of doing this in dopus? I see there is a way of setting them pragmatically. But I could not find a command to remove all information in one go.

If dopus cant do this I would be interested to know what tools others use to perform this task.

SetAttr META *
1 Like

Hey Kundal,

Thanks for that, you are correct that did exactly what I wanted.

I used..

..\xnview\nconvert.exe -rexifthumb -rmeta -q 85 {f}

to strip an image from extra thumbnail and all exif information.

Does "SetAttr META *" do the exact same ?!

You're assuming anyone who might answer knows what those switches to xnview utilities actually does and doesn't do :slight_smile:...

Since you have both tools - why don't you make a copy of an image, and run both methods against one file and the other and see if there are any differences?

Yes of course, everone knows nconvert.exe.. don't you ?!.. o) Ok.. let's be serious.. o)

I had a test on my own, as you suggested and found out:

"SetAttr META *" does NOT remove the thumbnail and it does not remove all exif/meta information from a jpg either, just a subset.

Following information is still present after running setattr, but I guess the command just isn't meant to remove every single bit of information from jpg-files.

[ Overview ]
Program: Not defined
White Balance: Auto
Flash: Flash did not fire

[ JPEG ]
Application Segment 0 (JFIF): 0x00000006
Application Segment 1 (Exif): 0x00000018
Encoder: Independent JPEG Group library (used by many applications), Quality: 85
and maybe some other software or cameras

Encoder Signature: 98DEC36FE95ED7C1772D9ED67A67E260:221111
Color Mode: RGB color
Subsampling ratio of Y to C: YCbCr4:2:0
Encoding Process: Baseline DCT, Huffman coding
Bits per Sample: 8 bps
Image Height: 3000 px
Image Width: 4000 px
Number of image components in frame: 3 comp.

[ Image ]
Orientation of image: 0° (top/left)
Image resolution in width direction: 180 dpi
Image resolution in height direction: 180 dpi
Unit of X and Y resolution: inch
File change date and time: 2012-07-25 10:37:22
Y and C positioning: Co-Sited
Exif IFD Pointer: 0x0000023A
PRINT Image Matching: 0x000000AA

[ Thumbnail Info ]
Compression scheme: JPEG (old-style)
Orientation of image: 0° (top/left)
Image resolution in width direction: 180 dpi
Image resolution in height direction: 180 dpi
Unit of X and Y resolution: inch
Offset to JPEG SOI: 0x00002A44
Bytes of JPEG data: 6423 bytes
Y and C positioning: Co-Sited

[ Camera ]
Exposure program: Not defined
??? (8830): 1
Exif version: 2.3
Date and time of original data generation: 2012-07-25 10:37:22
Date and time of digital data generation: 2012-07-25 10:37:22
Meaning of each component: YCbCr
Image compression mode: 4 bpp
Maximum lens aperture: 3.36 Av (F3.2)
Metering mode: Unknown
Light source: Flash
Flash: Flash did not fire
Manufacturer notes: 0x000003D4
Supported Flashpix version: 1.0
Color space: sRGB
Image width: 4000 px
Image height: 3000 px
Interoperability IFD Pointer: 0x000029B0
Sensing method: One-chip color area sensor
File source: Digital Camera
Scene type: A directly photographed image
Custom image processing: Custom process
Exposure mode: Auto exposure
White balance: Auto
??? (A404): 0
Scene capture type: Standard
Gain control: None
Contrast: Normal
Saturation: Normal
Sharpness: Normal

[ Interoperability ]
Interoperability Identification: R98: DCF basic file (sRGB)
Interoperability Version: 1.0

[ JPEG File Interchange Format ]
JFIF Version: 1.01
Units for the X and Y densities: X and Y are dots per inch
Horizontal pixel density: 72 dpi
Vertical pixel density: 72 dpi
Thumbnail horizontal pixel count: Not set
Thumbnail vertical pixel count: Not set

[ PRINT Image Matching ]
PrintIM Version: Version 2.5
??? (0001): 0x00160016
??? (0002): 0x00000000
??? (0003): 0x00000064
??? (0007): 0x00000000
??? (0008): 0x00000000
??? (0009): 0x00000000
??? (000A): 0x00000000
??? (000B): 0x000000AC
??? (000C): 0x00000000
??? (000D): 0x00000000
??? (000E): 0x000000C4
??? (0100): 0x00000005
??? (0101): 0x00000001
??? (0110): 0x00000080

When run through "nconvert" what's left in the image-file is this, saving some 20-40kb (quite an amount of data, if you generate thumbnails for web-usage e.g):
[ Overview ]
nothing.. o)

So thanks, my question is answered.. o)

This is an important piece of information and worth placing in a "tips" section so that it easily found by users. One method seems to keep important NON IDENTIFIABLE information while the other is a great way to save a lot of overhead on files.

If it's worth the tips section, maybe.. but we have none.. o))

Btw, i used the "PhotoME" to list that exif information above and to get that decent formatted bbcode output (in case anyone wonders if i have to much time left).. o)

Hmmm... I was going to ask what gave you that additional info... but are you sure that it's dumping out ONLY EXIF data? It's come up several times on the forums that Opus ONLY supports EXIF. Perhaps that data you saw is data stored in ~other tag formats...? For instance, in your comparison - you didn't seem to use an "EXIF" specific arg to tell nconvert to remove the tags... you used "-rmeta"... and then PhotoME itself seems to also support "Exif, IPTC & ICC" tag formats...

I appologize, what do you mean with "Hmmm... I was going to ask what gave you that additional info" ?

Nice find!.. o) I'm actually not sure and wasn't aware, that nconvert would possibly strip out more than just the exif information, but it obviously does (given that my jpgs contain further tag formats).
Yes, exif is not the only tagging standard. I somehow did not think of that and that there might be other tag formats in my jpgs, which DO won't touch right now, when "SettAttr META" is used.

@Kundal ?!
You came up with that command, now please explain.. o)

Is there a chance to get to know what exactly DO is about to remove, when calling "SetAttr META *" ?! I had a quick look into the manual, but couldn't find any details on that.

The command SetAttr META * simply deletes all supported Metadata from files. Read Keywords for SetAttr META in the manual for more information:
http://www.gpsoft.com.au/help/opus10/default.htm#!Documents/Keywords_for_SetAttr_META.htm

Right... so @tbone: what needs explaining? Unless you've found that there is indeed "EXIF" data that the Opus command is NOT removing (like it seemed was the case from your comparison), then why would you expect it to do anything with tag data in formats that aren't supported - like IPTC, ICC or XMP?

If you were then asking if you could see some sort of "preview" of what particular tag info that 'SetAttr META *' is about to nuke... no, not interactively in the form of a dialog or anything... but you can certainly open the METAPANE and see whats there... and the command will be removing everything you see :slight_smile:.

Mhh, please keep cool, I did not indent to make anybody angry or something, I just want to understand what's going on.
@steje
I do not expect DO to operate on any other tag format, please don't get me wrong. I don't want to see some preview either of what SetAttr is going to remove. Please watch the screenshots, then you might get the idea what confuses me.

@Kundal
I had a look onto that manual-page already, as I said, it doesn't give any information on what will be removed when "SettAtr Meta *" is used.

You guys say: It will remove all there is in the meta-pane (any exif related information), but then please watch this:




If you tell me, "SetAttr META *" is going to remove any information, which is visible and editable in the metadata pane, then that is obviously not true.
NConvert.exe on the other side, does erase any exif information perfectly, and that is somehow what I expected from using "SettAttr META *". Why it does not, is maybe some thing to look into.. ?! If I oversee anything here, please tell me. I just want to know. Here one more image, showing different results in the tooltip. If DO is doing exif only, than the left tooltip should be as blank as the one on the right.

Clipboard Image (2).png

btw: That attachment handling goes nutssomehow, when attachments are placed inline, does it ?!.. o))


I cannot edit my posts anymore, where's that button to do so.. did I miss anything ?! Has it been removed ?!

If you want to remove the actual metadata chunks from an image file you'll need to use a separate tool.

Editing posts - nothing has changed.

...well, sure. Did someone lose their cool :slight_smile:???

Hmm... then I'm confused now too... I thought (like Kundal) that that command would strip ~whatever metadata that is relevant to the filetype? Is it that by "remove the actual metadata chunks" do you mean that Opus is currently just clearing the data from each field in the EXIF header, but that the header is still left with each tags field left intact - just with no data? But there are several fields in his screenshot that still seem to contain actual values... Or is that Opus assuming some default value?

The fields that are cleared should be removed from the EXIF tag but the tag will still be there in the file. Whether the file actually ends up smaller or not depends on the total size of the EXIF tag and the amount of data removed - the EXIF tag is padded out to a certain size (probably a multiple of 4Kb although I'm not sure) and so the file size would only reduce if the tag got small enough to drop that padding.

I'm not sure why some fields (e.g. the shooting time) aren't being cleared - that looks like it might be a bug.

Detecting possible bugs is not a bad thing, thanks guys!.. o)

I forgot:

@Jon
Thanks for that "no reply" info-link.. then it must be about 6 years ago, that I've edited a post ?!
It feels like having done that most of the time until recently (for typos only of course!), strange.. o)