Thread

Posted on Thu Sep 7 00:53:14 2006 by rshbkr
Adding additional unknown tags to existing images
Hi, I need to add additional tags to existing tiff images, with specific values associated with each image. Did not use ExifToll till now. Want to use ExifToll as a module instead of the command line option. how can i add the tags and values to existing tiff images.(The TAG #'s are in the range of 45000 to 45016) Thanks Raja
Direct Responses: 2937 | Write a response
Posted on Thu Sep 7 03:05:10 2006 by exiftool in response to 2936
Re: Adding additional unknown tags to existing images
Hi Raja, I've got some reading for you:

First, you should look through the API documentation by typing "perldoc Image::ExifTool" or browsing html/ExifTool.html. This gives you details about how to call the functions in the module. This part should be relatively straightforward once you have a feel for the API. Basically, all you need to do is something like this:

my $exifTool = new Image::ExifTool; $exifTool->SetNewValue('MyNewTag' => $value); $exifTool->WriteInfo($file);

Then you should look at "ExifTool_config" for example of how to add user-defined tags. There isn't an example for adding an EXIF tag, but you can do it with an entry like this to your "~/.ExifTool_config" file:

%Image::ExifTool::UserDefined = ( 'Image::ExifTool::Exif::Main' => { 45000 => { Name => 'MyNewTag', Writable => 'int16u', WriteGroup => 'IFD0', }, }, );

The tag is written to the ExifIFD by default unless you specify another WriteGroup as IFD0 above. The Writable attribute must be set according to the format for the value. You can also add value conversions (ValueConv, ValueConvInv) and print conversions (PrintConv, PrintConvInv) if necessary.

Finally, you can read lib/Image/ExifTool/README for details about these attributes if necessary. Also see Exif.pm and WriteExif.pl for examples of attributes used for other tags.
Direct Responses: 2962 | Write a response
Posted on Thu Sep 7 20:55:25 2006 by rshbkr in response to 2937
Re: Adding additional unknown tags to existing images
Thanks for the help. I was able to add new userdefined tags and it worked.
Direct Responses: 3163 | Write a response
Posted on Mon Oct 2 21:49:14 2006 by panday in response to 2962
Re: Adding additional unknown tags to existing images
Hi! Newbee here. I've recently tried exploring ExiifTool to embed XMP information in my images (Note: It's also only recently that I started learning Perl). Anyway, I've tried the following code:
#!/usr/bin/perl</i> use Image::ExifTool; $exifTool->SetNewValue('tag1','data1'); $exifTool->WriteInfo('test.tif');
However, I keep on getting this error message -- Can't call method "SetNewValue" on an undefined value at test.pl line 5. Any idea on where I went wrong?? Any replies will be greatly appreciated and thank you in advance. - Panday
Direct Responses: 3164 | Write a response
Posted on Mon Oct 2 22:17:25 2006 by exiftool in response to 3163
Re: Adding additional unknown tags to existing images
Hi Panday,

You've forgotten the following line from my example:

my $exifTool = new Image::ExifTool;

You need to create an ExifTool object to use for accessing the writer functions.

Also, for your code to work, 'tag1' will need to be a valid tag name.

- Phil
Direct Responses: 3165 | Write a response
Posted on Tue Oct 3 00:25:25 2006 by panday in response to 3164
Re: Adding additional unknown tags to existing images

Thanks Phil! I think that resolve my earlier problem. However, you mentioned that my code would only work for a valid tag. I've tried making some edits to the ExifTool_config file as well as the XMP.pm file however I'm still getting an error message:

Tag 'tag1' does not exist

I want to add custom tailored metadata information such as <xap:volume>, <xap:issue> and <xap:publication>. I hope I'm not asking to much questions and again thank you in advance.


- Panday

Direct Responses: 3166 | Write a response
Posted on Tue Oct 3 00:45:00 2006 by panday in response to 3165
Re: Adding additional unknown tags to existing images

Here's some of the lines I added to the ExifTool_config

%Image::ExifTool::UserDefined::xap = ( GROUPS => { 0 => 'XMP', 1 => 'XMP-xap', 2 => 'Image' }, NAMESPACE => [ 'xap' => 'http://ns.myname.com/xap/1.0/' ], WRITABLE => 'string', volume => { }, );


and

'Image::ExifTool::XMP::Main' => { xap => { SubDirectory => { TagTable => 'Image::ExifTool::UserDefined::xap', }, }, }, 'Image::ExifTool::XMP::xap' => { volume => { } }, },
Direct Responses: 3167 | Write a response
Posted on Tue Oct 3 01:42:00 2006 by exiftool in response to 3166
Re: Adding additional unknown tags to existing images
There are a few problems with this:

1) I think you probably have too many right braces on the line with "volume => {}},".

2) Your "xap" namespace conflicts with an existing namespace. "xap" is the old name used for the "xmp" namespace. So you will have to choose another namespace prefix.

3) The table "Image::ExifTool::XMP::xap" doesn't exist. So your last definition will result in an error.

4) You have attempted to define the "volume" tag twice. Deleting all of the following code will solve problems 1, 3 and 4:

'Image::ExifTool::XMP::xap' => { volume => { } }, },

But in the process, you've highlighted a problem in ExifTool: I should be printing warning messages if there are syntax errors in the config file. This will be fixed in the next version, and I have uploaded a pre-release here since it may be useful to you.

- Phil
Direct Responses: 3168 | Write a response
Posted on Tue Oct 3 04:18:14 2006 by panday in response to 3167
Re: Adding additional unknown tags to existing images

Again Phil thank you for being patient with me.

I'm also glad that I was able to help report a minor bug

It was my intention to use "xap" - the old name space of "xmp". If I could simplify my earlier question, what if I want to add a new tag in the current "xap" namespace?

Just to further illustrate what I have in mind, here's an example of the XMP I need to embed inside the image

<rdf:Description> <xap:Volume>8</xap:Volume> <xap:Number>2</xap:Number> <xap:Publication>Liwayway</xap:Publication> <xap:PubDate> <rdf:Alt> <rdf:li>09/12/2006</rdf:li> </rdf:Alt> </xap:PubDate> <xap:Subject> <rdf:Bag> <rdf:li>Horror</rdf:li> </rdf:Bag> </xap:Subject> </rdf:Description>

Again, thank you.


- Henry Santyana

Direct Responses: 3169 | Write a response
Posted on Tue Oct 3 05:02:46 2006 by exiftool in response to 3168
Re: Adding additional unknown tags to existing images
Adding to an existing namespace is easier. The only trick here is that you have to use the newer 'xmp' namespace, not the older 'xap'. (Although ExifTool will honour the older namespaces if they already exist in the information.)

So all you needed was the part I told you to delete before (in the %Image::ExifTool::UserDefined hash), just like the 'NewXMPxmpTag' example:

'Image::ExifTool::XMP::xmp' => { Volume => { }, },

(Note the capitalized 'Volume', if that is how you want it recorded in the XMP.)

- Phil
Direct Responses: 3170 | Write a response
Posted on Tue Oct 3 07:00:56 2006 by panday in response to 3169
Re: Adding additional unknown tags to existing images

Hello Phil!

I'm still getting an error.

Tag 'Volume' does not exist

What I did was add

Volume => { },

where the

NewXMPxmpTag => { Groups => { 2 => 'Author' } },

used to be placed.

As for my code:

#!/usr/bin/perl use Image::ExifTool; my $exifTool = new Image::ExifTool; $exifTool->SetNewValue('Volume','01'); $exifTool->WriteInfo('test.tif');

Am I still missing anything?

- Henry Santyana

Direct Responses: 3175 | Write a response
Posted on Tue Oct 3 16:08:30 2006 by exiftool in response to 3170
Re: Adding additional unknown tags to existing images
Hi Henry,

You're not missing anything. That will work. Did you download the 6.45 pre-release? Perhaps there is a syntax error somewhere else in your config file. I suggest taking a new copy of the original config file and changing just 'NewXMPxmpTag' to 'Volume'.

Oh. And did you remember to copy the config file to ".ExifTool_config" in your home directory? (note the "." at the start of the file name.) ExifTool looks in your home directory for the config file.

- Phil
Direct Responses: 3176 | Write a response
Posted on Tue Oct 3 17:34:01 2006 by panday in response to 3175
Re: Adding additional unknown tags to existing images

Hello Phil!

I was able to finally make it work. However, it seems the config file needs to be placed where my script is placed and not in the home directory

Anyway, thank you very much for all the help.


- Henry Santyana

Direct Responses: 3180 | Write a response
Posted on Tue Oct 3 20:05:24 2006 by exiftool in response to 3176
Re: Adding additional unknown tags to existing images
Hi Henry,

I'm glad you figured it out.

This would happen if your HOME environment variable is not set. What shell are you using? All Unix shells I know set this, but I don't know about the Windows cmd shell.

The logic is as follows:

If the EXIFTOOL_HOME environment variable is set, ExifTool looks there for the config file. Otherwise, it looks in your HOME directory. If neither EXIFTOOL_HOME or HOME are set, then ExifTool defaults to using the current directory.

- Phil
Direct Responses: 3184 | 3458 | 3459 | Write a response
Posted on Wed Oct 4 02:09:49 2006 by exiftool in response to 3180
Re: Adding additional unknown tags to existing images
I just tested this on a Windows machine, and HOME is not set in the cmd shell environment. However, HOMEDRIVE and HOMEPATH are, so I will add the ability to use these if neither EXIFTOOL_HOME nor HOME is available. This feature will appear in 6.45 when it is released.

- Phil
Direct Responses: 3188 | Write a response
Posted on Wed Oct 4 14:32:23 2006 by panday in response to 3184
Re: Adding additional unknown tags to existing images

Hello Phil! I'm running in Windows XP via Active Perl 5.8.8. Does this answer your question?


- Panday

Direct Responses: 3190 | Write a response
Posted on Wed Oct 4 16:49:43 2006 by exiftool in response to 3188
Re: Adding additional unknown tags to existing images
Hi Panday,

Not really. But given that information it is likely that you are using the Windows cmd shell.

The environment variables (unfortunately) depend on the specific command shell that you are using, and are not related to the version of Perl or (technically) the system you are running. But the 'cmd' shell is (I believe) the only shell that ships with a standard Windows installation.

- Phil
Direct Responses: 3194 | 3195 | Write a response
Posted on Wed Oct 4 18:39:32 2006 by panday in response to 3190
Re: Adding additional unknown tags to existing images

Sorry about that . . .


Yup! I did use the MS Windows CMD shell


- Henry Santyana

Write a response
Posted on Wed Oct 4 18:40:09 2006 by panday in response to 3190
Re: Adding additional unknown tags to existing images

Sorry about that . . .


Yup! I did use the MS Windows CMD shell


- Henry Santyana

Write a response
Posted on Thu Nov 9 18:25:57 2006 by binouch in response to 3180
Re: Adding additional unknown tags to existing images
Hello, I just discovered this new module and the concept of what it could do is fantastic. I'm trying to put it into "production" in my environment but i'm running into some difficulties. I would like to add custom tags to files. Here is what i've done so far but infortunately i get the "Tag 'CustomerName' does not exist" error. I built a .ExifTool_config file that i put in both the EXIFTOOL_HOME directory and the dir in which i am running the script from (just to make sure - this is running on linux). Here is the content of the .ExifTool_config file :
%Image::ExifTool::UserDefined::myCompany = ( GROUPS => { 0 => 'XMP', 1 => 'XMP-xxx', 2 => 'Image' }, NAMESPACE => { 'myCompany' => 'http://ns.myname.com/xxx/1.0/' }, WRITABLE => 'string', # replace "NewXMPxxxTag1" with your own tag name (ie. "MyTag") CustomerName => { }, NewXMPxxxTag2 => { Groups => { 2 => 'Author' } }, NewXMPxxxTag3 => { List => 'Bag' }, ); # The %Image::ExifTool::UserDefined hash defines new tags to be # added to existing tables. %Image::ExifTool::UserDefined = ( # new XMP namespaces (ie. XMP-xxx) must be added to the Main XMP table: 'Image::ExifTool::XMP::Main' => { myCompany => { SubDirectory => { TagTable => 'Image::ExifTool::UserDefined::myCompany', }, }, }, );
And the script i'm running to write a new value to that tag on a file is the following :
#!/usr/bin/perl use Image::ExifTool; my $exifTool = new Image::ExifTool; $exifTool->SetNewValue(CustomerName => "Bla Inc"); $exifTool->WriteInfo('/raid1/Jobs/newCompany/Jacobs_018.tif');
Any kind of help would be appreciated - I'd really like to get this module working. Thank you in advance. Ben
Write a response
Posted on Thu Nov 9 18:29:08 2006 by binouch in response to 3180
Re: Adding additional unknown tags to existing images
Hello, I just discovered this new module and the concept of what it could do is fantastic. I'm trying to put it into "production" in my environment but i'm running into some difficulties. I would like to add custom tags to files. Here is what i've done so far but infortunately i get the "Tag 'CustomerName' does not exist" error. I built a .ExifTool_config file that i put in both the EXIFTOOL_HOME directory and the dir in which i am running the script from (just to make sure - this is running on linux). Here is the content of the .ExifTool_config file :
%Image::ExifTool::UserDefined::myCompany = ( GROUPS => { 0 => 'XMP', 1 => 'XMP-xxx', 2 => 'Image' }, NAMESPACE => { 'myCompany' => 'http://ns.myname.com/xxx/1.0/' }, WRITABLE => 'string', # replace "NewXMPxxxTag1" with your own tag name (ie. "MyTag") CustomerName => { }, NewXMPxxxTag2 => { Groups => { 2 => 'Author' } }, NewXMPxxxTag3 => { List => 'Bag' }, ); # The %Image::ExifTool::UserDefined hash defines new tags to be # added to existing tables. %Image::ExifTool::UserDefined = ( # new XMP namespaces (ie. XMP-xxx) must be added to the Main XMP table: 'Image::ExifTool::XMP::Main' => { myCompany => { SubDirectory => { TagTable => 'Image::ExifTool::UserDefined::myCompany', }, }, }, );
And the script i'm running to write a new value to that tag on a file is the following :
#!/usr/bin/perl use Image::ExifTool; my $exifTool = new Image::ExifTool; $exifTool->SetNewValue(CustomerName => "Bla Inc"); $exifTool->WriteInfo('/raid1/Jobs/newCompany/Jacobs_018.tif');
Any kind of help would be appreciated - I'd really like to get this module working. Thank you in advance. Ben
Direct Responses: 3461 | Write a response
Posted on Thu Nov 9 19:33:04 2006 by exiftool in response to 3459
Re: Adding additional unknown tags to existing images
I should add this to the FAQ because it seems to be a common problem. What you have done in the config file will work (I tested it), provided that ExifTool can find the config file.

To debug this, try putting the following line in your config file:

print "found it!\n";

You should then get a print-out if the config file is loaded. If you don't, check your environment variables and/or try moving the config file to the same location as your script. On Unix systems, this generally isn't a problem, but apparently Windows systems are not so consistent, and what works on my XP system may not work on yours.

Please let me know what you find.

- Phil
Direct Responses: 3464 | 3465 | 3466 | Write a response
Posted on Thu Nov 9 23:04:53 2006 by binouch in response to 3461
Re: Adding additional unknown tags to existing images
I don't really know why it wasn't seeing the EXIFTOOL_HOME env but it does now and printing the "find it" at the end is a good debugging "trick". It doesn't error out saying "couldn't find tag_name", but when i print out the ImageInfo that tag doesn't show. Would you have any idea why? Does it need to have a valid namespace and if yes would you have an example of how that should look? Thank you very much for your help. Ben
Write a response
Posted on Thu Nov 9 23:15:09 2006 by binouch in response to 3461
Re: Adding additional unknown tags to existing images
I don't really know why it wasn't seeing the EXIFTOOL_HOME env but it does now and printing the "find it" at the end is a good debugging "trick". It doesn't error out saying "couldn't find tag_name", but when i print out the ImageInfo that tag doesn't show. Would you have any idea why? Does it need to have a valid namespace and if yes would you have an example of how that should look? Thank you very much for your help. Ben
Write a response
Posted on Thu Nov 9 23:59:30 2006 by binouch in response to 3461
Re: Adding additional unknown tags to existing images
I don't really know why it wasn't seeing the EXIFTOOL_HOME env but it does now and printing the "find it" at the end is a good debugging "trick". It doesn't error out saying "couldn't find tag_name", but when i print out the ImageInfo that tag doesn't show. Would you have any idea why? Does it need to have a valid namespace and if yes would you have an example of how that should look? Thank you very much for your help. Ben
Direct Responses: 3468 | Write a response
Posted on Fri Nov 10 01:26:10 2006 by exiftool in response to 3466
Re: Adding additional unknown tags to existing images
I'm not sure what your problem is. Here is a terminal session (tcsh Unix terminal) with your .ExifTool_config installed:

% cp t/images/Writer.jpg a.jpg % ./exiftool a.jpg -customername=test found it! 1 image files updated % ./exiftool a.jpg -a -u -G1 found it! [ExifTool] ExifTool Version Number : 6.56 [File] File Name : a.jpg [File] File Size : 3 kB [File] File Modification Date/Time : 2006:11:09 18:18:09 [File] File Type : JPEG [File] MIME Type : image/jpeg [File] Image Width : 8 [File] Image Height : 8 [XMP-myCompany] Customer Name : test [Composite] Image Size : 8x8 % ./exiftool a.jpg -xmp -b found it! <?xpacket begin='.......' id='W5M0MpCehiHzreSzNTczkc9d'?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 6.56'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <rdf:Description rdf:about='' xmlns:myCompany='http://ns.myname.com/xxx/1.0/'> <myCompany:CustomerName>test</myCompany:CustomerName> </rdf:Description> </rdf:RDF> </x:xmpmeta>

So this doesn't work for you? (with commands translated as appropriate for your terminal type.) Try a test using the same image (t/images/Writer.jpg) and paste your terminal session so I can see the output.

- Phil
Direct Responses: 3469 | 3470 | Write a response
Posted on Fri Nov 10 01:39:00 2006 by exiftool in response to 3468
Re: Adding additional unknown tags to existing images
Oh. I should mention that if you paste the output to this forum, you must wrap it in <code> ... <code> to protect the formatting and special characters. Also, I had to delete the non-ASCII characters in the quotes after "xpacket begin=" because they were generating a format error when I tried to post.
Write a response
Posted on Fri Nov 10 01:40:28 2006 by exiftool in response to 3468
Re: Adding additional unknown tags to existing images
sorry, that's <code> ... </code>

(wish this forum had an edit feature...)
Direct Responses: 3504 | Write a response
Posted on Sun Nov 12 23:42:14 2006 by binouch in response to 3470
Re: Adding additional unknown tags to existing images
Hi Phil, Thank you very much for your help - here is the error i get but i think at this point it's not related to your module but i need to do my home work about XMP namespaces.
[root@dev newCompany]# exiftool Jacobs_018.tif -CompanyName='newCompany' found it! No URI for namepace prefix HASH(0x8f32234)! Warning: Undefined XMP namespace: HASH(0x8f32234) - Jacobs_018.tif Error: Internal error writing IFD0:ApplicationNotes - Jacobs_018.tif 0 image files updated 1 files weren't updated due to errors
On a different note you say on the product home page under "Known Problems" that "Some applications on Macintosh systems may store information in the resource fork of a file. ExifTool does not process the resource fork, so this information is lost if the file is rewritten." What can be the consequence of that - in the environment in which i would like to deploy this all my users access their images using a mac - does that mean that the information written with ExifTool could get erassed ? Thank you very much for your help. Ben
Direct Responses: 3509 | Write a response
Posted on Mon Nov 13 03:25:45 2006 by exiftool in response to 3504
Re: Adding additional unknown tags to existing images
Sorry, that is an ExifTool problem. I used a technique to define the XMP namespace (with curly braces instead of square brackets) that I added recently. Either update to the latest ExifTool or change to square brackets on the "NAMESPACE" line. This should fix the problem.

I'm on a Mac here, btw. The Mac resource fork is typically used to store preference settings and state information, and usually not much more (at least with the file formats that ExifTool will edit). Any files exchanged from a Mac to a PC automatically lose the resource fork anyway. So there is usually no crutial information stored in the resource fork.

- Phil
Direct Responses: 3519 | Write a response
Posted on Mon Nov 13 16:04:56 2006 by binouch in response to 3509
Re: Adding additional unknown tags to existing images
I installed the latest version of ExifTool and it works great now :) Thank you Phil. If i may ask you another question : when i write a new tag or a new value to a file in the following way:
exiftool Jacobs_018.tif -CompanyName=BlaInc
it takes a few seconds depending on the size of the file. I tried it on a 600MB file and it takes well over a minute.
[root@dev MODELS]# time exiftool large_file.tif -CompanyName=BlaInc found it! 1 image files updated real 1m29.322s user 0m7.330s sys 0m18.940s
so the qestion is : can i run exiftool in a way that's more optimized? (reading the XMP info is very fast). Thank you for your help, your answers so far and this module in general which is very valuable for what i'm trying to do. Ben
Direct Responses: 3520 | Write a response
Posted on Mon Nov 13 17:21:30 2006 by exiftool in response to 3519
Re: Adding additional unknown tags to existing images
Wow, 600MB. That's a big file. I've made a number of optimizations to improve performance for large files, and I don't think you will find anything that is much faster. I'm sure you are I/O limited here... How long does it take you to do a straight copy of this file?

I generated a 600MB test TIFF on my system here, and here is what I got:

% time ./exiftool Untitled-1.tif -xmp:author=phil 1 image files updated 1.012u 6.075s 1:02.47 11.3% 0+0k 0+40io 0pf+0w % time cp Untitled-1.tif a.tif 0.005u 2.328s 1:03.41 3.6% 0+0k 0+58io 0pf+0w

On my system, rewriting the file with ExifTool took 62.47 secs, but using the copy command to copy the file took 63.41 secs. So I'm pretty happy with the ExifTool performance here. :)

- Phil
Direct Responses: 3523 | Write a response
Posted on Mon Nov 13 17:47:10 2006 by binouch in response to 3520
Re: Adding additional unknown tags to existing images
Ok - so i remember reading that ExifTool copies the file first before writting new tags. I hadn't really paid much attention to that, but looking at it closer i see that it recreates a new file and keeps the old one there. It looks like it's somewhat of a security feature you put there - would it be possible to go around that meaning - can i write to the file directly without copying it first; as you can guess working with files that big if i make a copy every time i write meta data my file system will be full very quickly; and at the same time the date on the file is going to be different - that kind of defeats the purpose of putting meta data if the "creation" date isn't accurate. What do you think the solution could be for that? Thank you:) Ben
Direct Responses: 3524 | Write a response
Posted on Mon Nov 13 17:59:23 2006 by exiftool in response to 3523
Re: Adding additional unknown tags to existing images
ExifTool doesn't "copy" the file, it just writes it to an output file with a different name when it modifies the information. You can force it to overwrite the original with the -overwrite_original or -overwrite_original_in_place options, but you should maintain your own backups if you do this. And you can use the -P option to preserve the original creation date of the image.
Direct Responses: 3525 | Write a response
Posted on Mon Nov 13 18:11:48 2006 by binouch in response to 3524
Re: Adding additional unknown tags to existing images
Cool - that's great. Thank you Phil, what i was thinking after sending you that last question was eventually to capture the dates from the file before exiftool writes new tag info and then inclulde that in the new modification but those fields might be not writtable. Are there any other fields that are modified when the new output file is created? Thank you . Ben
Direct Responses: 3526 | Write a response
Posted on Mon Nov 13 18:59:24 2006 by exiftool in response to 3525
Re: Adding additional unknown tags to existing images
Hi Ben,

No meta information is modified when you rewrite a file unless you specifically write a new value. The -P option preserves the file system creation date, which is a property of the filesystem and not data within the file. Other filesystem properties in general will not be preserved, but any real information will. These properties include read/write permissions, icon location, etc. The -overwrite_original_in_place option is designed to preserve as many of these other filesystem properties as possible, but in general the filesystem information is not handled by exiftool.

I'm sure this isn't the answer you expected, but hopefully now you understand a bit more about what is going on.

- Phil
Direct Responses: 3527 | Write a response
Posted on Mon Nov 13 19:23:24 2006 by binouch in response to 3526
Re: Adding additional unknown tags to existing images
Thank you Phil
Indeed i do understand what goes on under the hood a little better now.
I don't want to seem insistant about this but if one uses the -overwrite_original_in_place option why is it necessary to write a new output file. Would it be possible to to just go write a new tag or a new value for a tag and that's all?
The reason why i'm asking is because if this is ran using a script from the command line - it's fine i don't really mind it taking over a minute per large file, but if i build a GUI for this for a user to be able to dynamically edit the meta data of a file, waiting over a minute for an update won't work.
I don't know if you had that in mind when you wrote this module.
Thanks,

Ben

PS: i just noticed you can put line break tags in the text - hehehehe
Direct Responses: 3529 | Write a response
Posted on Mon Nov 13 20:00:31 2006 by exiftool in response to 3527
Re: Adding additional unknown tags to existing images
Hi Ben,

I think the -overwrite_original_in_place option name may be a bit misleading. When the "in_place" option is used, an extra step is added where the final image is copied to overwrite the original. So this would slow you down by a factor of 2, and is definitely not what you want.

While there are some tricks which can be taken to avoid rewriting a TIFF file completely, these tricks in general will result in wasted space within the image, so the image size will continue to grow and grow if it is edited repeatedly. ExifTool does not use these tricks.

There is also a technique for specifically rewriting XMP information in place, since the specification suggests adding a couple of kilobytes of blank data to allow the XMP record a bit of room to grow before the file need rewriting. ExifTool does not take advantage of this either.

I don't rule out the possibility of adding specific tricks like this in the future, but right now ExifTool uses a more general approach to editing the meta information -- one that works for all situations.

- Phil
Direct Responses: 3530 | 3531 | Write a response
Posted on Mon Nov 13 21:35:41 2006 by binouch in response to 3529
Re: Adding additional unknown tags to existing images
Well even though i guess having a graphical user interface for editing meta data and keeping the header "organized" are not really compatible, i like the fact that the header remains "small". I'll stay posted on your site to see if you include some of those "tricks" in the future. Out of curiosity do those tricks include what the XMP toolkit form Adobe does?

Thank you very much for your help Phil. :)
Write a response
Posted on Mon Nov 13 22:28:13 2006 by binouch in response to 3529
Re: Adding additional unknown tags to existing images
Well even though i guess having a graphical user interface for editing meta data and keeping the header "organized" are not really compatible, i like the fact that the header remains "small". I'll stay posted on your site to see if you include some of those "tricks" in the future. Out of curiosity do those tricks include what the XMP toolkit form Adobe does?

Thank you very much for your help Phil. :)
Direct Responses: 3532 | Write a response
Posted on Mon Nov 13 23:27:30 2006 by exiftool in response to 3531
Re: Adding additional unknown tags to existing images
I haven't used the Adobe XMP toolkit, but you would be able to tell by the write speed with a large TIFF like yours if they are using some tricks to avoid rewriting the entire image. It would be interesting to know if they do.
Write a response