How to add composite data into an MIE file ( in the XMP area) ?

Started by Archive, May 12, 2010, 08:54:11 AM

Previous topic - Next topic

Archive

[Originally posted by oops66 on 2007-11-18 02:01:31-08]

Hello,
I would like to know, how to add composites data into an MIE file (ex: in the XMP area into the MIE) ?
Maybe with a custom .ExifTool_config file Huh
and : exiftool -o %%d%%f.mie "G:\perso\test1"
then: exiftool -tagsfromfile "a.mie" -all:all "a.jpg" to update the picture.

---- Composite data like : ----    
     - GPS Date/Time                   : 2007:11:08 16:49:15
     - GPS Position                    : 47 deg 13' 35.26" N, 1 deg 33' 36.66" W
     - Scale Factor To 35mm Equivalent : 5.9
     - Focal Length                    : 16.7mm (35mm equivalent: 99.1mm)
     - Circle Of Confusion             : 0.004 mm
     - Hyperfocal Distance             : 20.28 m
     - Light Value                     : 8.4

Congratulations for your useful tool.

Archive

[Originally posted by exiftool on 2007-11-18 12:46:19-08]

If you add all of the tags required in the Composite tag
calculation, then exiftool will recalculate the tag based
on the information from the MIE file.  However, if you really
want to store the Composite tag separately, the sample
config
file
contains examples of how to add
user-defined MIE tags.  In this case, it is probably easiest
to create a "Composite" SubDirectory in the MIE::Meta
information for this purpose.  Just follow the example of
the "Test" SubDirectory in the sample config file.

Once you have done this, add "-Composite:all>MIE-Composite:all" to your
-tagsFromFile command to create the new tags. (Assuming you
put them in a "MIE-Composite" group.)

- Phil

Archive

[Originally posted by exiftool on 2007-11-18 12:49:22-08]

I just re-read your question after I posted my response
and notice you mention writing to XMP information in the
MIE file.  There are also examples of adding user-defined
XMP tags in a new XMP namespace, and this would work too.

Also, you mention a 2-stage process to get these tags into
the MIE file, but you should be able to create the MIE file
and copy these tags over in a single command.

- Phil

Archive

[Originally posted by oops66 on 2007-11-18 13:45:43-08]

Thanks a lot Phil.
I gonna make some tests...

Archive

[Originally posted by oops66 on 2007-11-29 13:51:27-08]

Hello Phil,
Thanks, for your help, it works fine .

But I would also like to modify the number of decimales of some composites data shown.
for exemple : ( under Image-ExifTool-7.03\lib\Image\ExifTool\exif.pm ):
Code:
ScaleFactor35efl => {...
PrintConv => 'sprintf("%.3f", $val)', (***instead : PrintConv => 'sprintf("%.1f", $val)',***)
Under perl it works by this way, but with the stand-alone Windows executable, it seems, it's not possible ?

How can I get this with your stand-alone Windows executable ?
Or
How can I buld my own stand-alone Windows executable exiftool.exe file from the modifed perl exiftool files ?
Have a nice day,
Merci,
Chris.

Archive

[Originally posted by exiftool on 2007-11-29 14:22:09-08]

Hi Chris,

I'm assuming that you're still modifying the exiftool .pm files instead
of creating your own user-defined tags in a .ExifTool_config file?

If you use the config file technique, then it will work with the
Windows executable version.

- Phil

Archive

[Originally posted by oops66 on 2007-11-29 14:49:49-08]

Hi Phil,

Yes, I have created only few user-defined tags into my .Exiftool_config file, but not for composites data (excepted the standard field like:
Code:
ScaleFactor35efl => { },
...
Then I will try your way, with a defferent name like : ScaleFactor35efl_my ...
But, is it difficult to build an own stand-alone Windows executable exiftool.exe file ?
Re-Merci,
Chris.

Archive

[Originally posted by exiftool on 2007-11-29 14:59:39-08]

Hi Chris,

You can either use a different tag name, or override the exiftool
definition by using the same tag name.  Either is fine.

Building the .exe is not simple, and I don't provide instructions
for doing so because walking people through this procedure would
be time consuming for me.  But if you want to try on your own, I do
it using the PAR module.

- Phil

Archive

[Originally posted by exiftool on 2007-11-29 15:06:38-08]

Chris,

I don't provide support for this, but here is the file I use as
input to pp for building the .exe:

Code:
#------------------------------------------------------------------------------
# File:         pp_build_exe.args
#
# Description:  Arguments for building stand-along Windows executable
#
# Revisions:    2006-11-22 - P. Harvey Created
#
# Requires:     The PAR (Perl Archive) module must be installed
#
# Checklist: 1) Build tag lookup: "./build_tag_lookup".
#            2) Set exiftool version number in "-T" line below.
#            3) Add any new modules to the list below.
#            4) Make sure "windows_exiftool" is up to date.
#            5) Back up "exiftool" and "cp windows_exiftool exiftool".
#            6) In a "cmd.exe" window, type "pp @pp_build_exe.args".
#            7) Change back to Unix shell and restore original "exiftool".
#            8) Rename "exiftool.exe" to "exiftool(-k).exe".
#            9) Create a .zip archive: "zip exiftool-#.##.zip exiftool\(-k\).exe".
#           10) Copy zip archive to web servers.
#           11) Update zip file version in link and text of html/index.html.
#------------------------------------------------------------------------------
-T exiftool-7.04
-o exiftool.exe -I lib
-M Image::ExifTool::AFCP
-M Image::ExifTool::AIFF
-M Image::ExifTool::APE
-M Image::ExifTool::APP12
-M Image::ExifTool::ASF
-M Image::ExifTool::BMP
-M Image::ExifTool::BigTIFF
-M Image::ExifTool::BuildTagLookup
-M Image::ExifTool::Canon
-M Image::ExifTool::CanonCustom
-M Image::ExifTool::CanonRaw
-M Image::ExifTool::CanonVRD
-M Image::ExifTool::Casio
-M Image::ExifTool::DICOM
-M Image::ExifTool::DNG
-M Image::ExifTool::Exif
-M Image::ExifTool::Fixup
-M Image::ExifTool::FLAC
-M Image::ExifTool::Flash
-M Image::ExifTool::FlashPix
-M Image::ExifTool::FotoStation
-M Image::ExifTool::FujiFilm
-M Image::ExifTool::GeoTiff
-M Image::ExifTool::GIF
-M Image::ExifTool::GPS
-M Image::ExifTool::HP
-M Image::ExifTool::HTML
-M Image::ExifTool::HtmlDump
-M Image::ExifTool::ICC_Profile
-M Image::ExifTool::ID3
-M Image::ExifTool::IPTC
-M Image::ExifTool::JPEG
-M Image::ExifTool::Jpeg2000
-M Image::ExifTool::JVC
-M Image::ExifTool::Kodak
-M Image::ExifTool::KyoceraRaw
-M Image::ExifTool::Leaf
-M Image::ExifTool::MakerNotes
-M Image::ExifTool::MIE
-M Image::ExifTool::MIFF
-M Image::ExifTool::Minolta
-M Image::ExifTool::MinoltaRaw
-M Image::ExifTool::MNG
-M Image::ExifTool::MPC
-M Image::ExifTool::MPEG
-M Image::ExifTool::Nikon
-M Image::ExifTool::NikonCapture
-M Image::ExifTool::Olympus
-M Image::ExifTool::Panasonic
-M Image::ExifTool::PDF
-M Image::ExifTool::Pentax
-M Image::ExifTool::PhotoMechanic
-M Image::ExifTool::Photoshop
-M Image::ExifTool::PICT
-M Image::ExifTool::PNG
-M Image::ExifTool::PostScript
-M Image::ExifTool::PPM
-M Image::ExifTool::PrintIM
-M Image::ExifTool::QuickTime
-M Image::ExifTool::Real
-M Image::ExifTool::Ricoh
-M Image::ExifTool::RIFF
-M Image::ExifTool::Sanyo
-M Image::ExifTool::Shortcuts
-M Image::ExifTool::Sigma
-M Image::ExifTool::SigmaRaw
-M Image::ExifTool::Sony
-M Image::ExifTool::TagLookup
-M Image::ExifTool::Unknown
-M Image::ExifTool::Vorbis
-M Image::ExifTool::XMP
-M Image::File::RandomAccess
-M Image/ExifTool/Shift.pl
-M Image/ExifTool/WriteCanonRaw.pl
-M Image/ExifTool/WriteExif.pl
-M Image/ExifTool/WriteIPTC.pl
-M Image/ExifTool/WritePhotoshop.pl
-M Image/ExifTool/WritePNG.pl
-M Image/ExifTool/WritePostScript.pl
-M Image/ExifTool/Writer.pl
-M Image/ExifTool/WriteXMP.pl
exiftool

- Phil

Archive

[Originally posted by oops66 on 2007-11-29 15:46:19-08]

Thank's for all Phil,
Et bonne fin d'annee (in French)!
Chris.

Archive

[Originally posted by oops66 on 2007-12-02 00:42:17-08]

Hi Phil
The last question ( I hope - LOL )!
Is it possible to add the atan math perl function into exiftool (stand alone win version).
Because I need to compute extra composites data with atan, (atan2 already works, but not atan).
(atan perl: http://www.haxite.org/index.php3?site=forum&nx1=f_display&ID=86709&start=0 ).
Thank you,
Chris.

Archive

[Originally posted by exiftool on 2007-12-02 01:32:53-08]

Yes.  If you want to store Composite information in XMP format (in a MIE
file or any other file supporting XMP), add user-defined tags in the
.ExifTool_config file for the new information you want.  The sample
config file contains examples of adding new XMP information too.

- Phil

Archive

[Originally posted by oops66 on 2007-12-02 02:34:00-08]

Yes, I have already do that (add user-defined tags in the .ExifTool_config file) and it's fine.
But the atan math function does not work by default in perl ?

Code:
# it works (with sin, atan2, + - * / ...) (but does not work with atan ) :
# sample:
CCDllargmm => {
Require => {
            0 => 'CCDdiagomm',
            1 => 'ImageSizeRapportSize',
        },        
            ValueConv => '((sin(atan2(1,$val[1])) * $val[0]))',
            PrintConv => 'sprintf("%.3f mm Width/ Largeur ",$val)',
    },

Archive

[Originally posted by exiftool on 2007-12-02 12:24:12-08]

There is no atan() function in Perl.  You have to either use the
atan2() function, or import the Math::Trig module if available
by adding "use Math::Trig;" before you call the function.  Math::Trig
contains the tan, atan, atan2, asin, acos, sec, csc, cot, asec, acsc,
acot, sinh, cosh, tanh, sech, csch, coth, asinh, acosh, atanh, asech,
acsch, acoth and pi functions not found in the core Perl library.

Math::Trig should be available if you have Perl installed, but may
not be available if you are using the Windows executable version.

- Phil

Archive

[Originally posted by oops66 on 2007-12-02 12:53:43-08]

OK, I will try this or an other way for that,
Thanks for all your help !
Have a nice day Phil.