Request: XMP external

Having trouble using an XCmd or XFcn? Post your questions here.

Request: XMP external

Postby Mike » Sat May 02, 2009 10:32 am

Hi. I find myself looking for an external that could be used to get and set some data for .jpg files. In particular I'm looking at data like Title, Description, Author, Copyright and URL. Anyone know of any external that can do this or is willing to write one?
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby sctell » Sat May 02, 2009 11:00 am

Hi Mike,

I do not think this is straight forward.

When I was doing a little research on EXIF within OS X I believe there was issues with some of the Cocoa routines and I only got as far as reading some of the data.

Have you researched tools like exiftool which may do all you require.

http://www.sno.phy.queensu.ca/~phil/exiftool/
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am

Re: Request: XMP external

Postby bmartin » Sat May 02, 2009 12:24 pm

Hi Mike,

I was doing some research for EXIF info in Mac OS X and I stumbled upon a commandline tool you may be able to use. SIPS I looked at it briefly and was able to read the copyright and I saw they have a set command so you can check out the man page in the terminal like so:

man sips
Bruce Martin

Mac Os 10.6.3
2.8 Ghz Intel Core 2 Duo
4GB 1067 MHz DDR3
User avatar
bmartin
 
Posts: 149
Joined: Mon Jul 07, 2008 7:26 am
Location: Stroudsburg, PA

Re: Request: XMP external

Postby Mike » Sat May 02, 2009 6:17 pm

bmartin wrote:Hi Mike,

I was doing some research for EXIF info in Mac OS X and I stumbled upon a commandline tool you may be able to use. SIPS I looked at it briefly and was able to read the copyright and I saw they have a set command so you can check out the man page in the terminal like so:

man sips


Unfortunately SIPS doesn't seem to provide the info I'm looking for (unless I didn't call it correctly... which could be possible). Shame really... would have been nice to just use the shell to get and set the data with something that is built into Mac OS X for everyone. I'll have a look at Terry's suggestion... although I'm a bit concerned as that seems to involve installing some third-party libraries and command-line application to work and I'm not sure I'll want my app installing things like that in order to function... or requiring users to install something like that for my app to work. Which is why I was asking about an external to do this stuff within SC.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby marksch » Sat May 02, 2009 10:38 pm

Hi Mike,

I simply make ExifTools part of the standalone and use the whole path to the command line tool in the shell function. No additional installation involved. ExifTools really is the tool you want. It would be a shame to spend time on writing an external while you have ExifTools available already.

Best,

Mark
We have time for new projects. Contact me at http://qery.us/du now and be first in line.

Biggest free icon collection ever: http://icons.qery.us
User avatar
marksch
 
Posts: 78
Joined: Fri Aug 22, 2008 4:51 am

Re: Request: XMP external

Postby Mike » Sun May 03, 2009 6:08 am

marksch wrote:I simply make ExifTools part of the standalone and use the whole path to the command line tool in the shell function. No additional installation involved.


Hi Mark,

OK, that sounds like it would work for me. :) I'll give it a try.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby Mike » Sun May 03, 2009 6:23 am

The install window mentioned installing not just the exiftool, but also "exiftool perl libraries". I just looked in /Library/Perl/#.## but I don't know what I'm looking for. Nothing there is named exiftool perl libraries. Even if I knew what was just installed there, wouldn't exiftool be looking for it at that location?
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby johnjohnston1 » Sun May 03, 2009 7:24 am

Mike Yenco wrote:The install window mentioned installing not just the exiftool, but also "exiftool perl libraries". I just looked in /Library/Perl/#.## but I don't know what I'm looking for. Nothing there is named exiftool perl libraries. Even if I knew what was just installed there, wouldn't exiftool be looking for it at that location?


Hi Mike,
You can just use the exiftools app that comes down in the folder.

For instance I un zipped it to /Desktop/temp2/Image-ExifTool-7.74/

so in SC I can
put shell("/Users/johnjohn/Desktop/temp2/Image-ExifTool-7.74/exiftool -h") into cd fld 1
To get all of the help.
If you stick the exiftool file in your apps bundle you can point to it there.

cheers

john
User avatar
johnjohnston1
 
Posts: 196
Joined: Sun Jul 06, 2008 10:42 am
Location: Glasgow, UK

Re: Request: XMP external

Postby Mike » Sun May 03, 2009 7:55 am

johnjohnston wrote:You can just use the exiftools app that comes down in the folder.

For instance I un zipped it to /Desktop/temp2/Image-ExifTool-7.74/

so in SC I can
put shell("/Users/johnjohn/Desktop/temp2/Image-ExifTool-7.74/exiftool -h") into cd fld 1
To get all of the help.
If you stick the exiftool file in your apps bundle you can point to it there.


Hi John,

Not sure what you mean by comes down in the folder. I found exiftool in /usr/bin after the download and install. I dragged exiftool into a folder named "Exif Test" on my desktop and tried the following from a SC project in the same folder:

Code: Select all
on mouseUp
  put projPath(this proj) & "exiftool" into tPath
  put HFStoPOSIX(tPath) into tToolPath
  put replace(tToolPath," ","\ ") into tToolPath
  put merge("[[tToolPath]] -h") into tCmd
  put shell(tCmd) into cd fld 1
end mouseUp


I'm not getting anything returned in cd fld 1 :(
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby johnjohnston1 » Sun May 03, 2009 8:46 am

Mike Yenco wrote:
Hi John,

Not sure what you mean by comes down in the folder. I found exiftool in /usr/bin after the download and install. I dragged exiftool into a folder named "Exif Test" on my desktop and tried the following from a SC project in the same folder:

Code: Select all
on mouseUp
  put projPath(this proj) & "exiftool" into tPath
  put HFStoPOSIX(tPath) into tToolPath
  put replace(tToolPath," ","\ ") into tToolPath
  put merge("[[tToolPath]] -h") into tCmd
  put shell(tCmd) into cd fld 1
end mouseUp

I'm not getting anything returned in cd fld 1 :(
Hi Mike,
i just did that here and it worked.

I had downloaded this file:
http://www.sno.phy.queensu.ca/~phil/exi ... .74.tar.gz
with Safari, it auto unzips and then I double click the tar file to open that.
In the resulting folder there is an exiftool file
I created a SC proj with your script in a button and a cd field
It worked.

User avatar
johnjohnston1
 
Posts: 196
Joined: Sun Jul 06, 2008 10:42 am
Location: Glasgow, UK

Re: Request: XMP external

Postby Mike » Sun May 03, 2009 9:28 am

OK, progressing on a path to this working. I was trying to figure out how to remove this thing thinking maybe I'd have to start over again from scratch... and in the instructions on the site for this tool it mentioned not only exiftool being in /usr/bin but also a "Lib" folder. I tried dragging that "Lib" folder to my project folder to join my SC project and the exiftool app and the project now is returning data. :)

So now the challenge will be figuring out where the data I want is and if I want to read it there or from other specification. It appears that iPhoto puts "Title" and "Description" in as IPTC with the tags "Object Name" and "Caption-Abstract". So it wasn't XMP as I thought. Not sure if IPTC has a tag for the photographer/artist, URL, etc. I *think* that XMP is supposed to... but now I'm not sure if I want to just add some data in one specification and some in another... or try to find one specification that has tags for everything. :?
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 211
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Request: XMP external

Postby sctell » Mon May 04, 2009 9:30 am

Hi Mike,

How is it going with this command line tool.

I have just been playing a little and a typical output of exif info is for me using this script.

Is there a better way to format the data returned for display within SC.

Code: Select all
on mouseUp
global gCurrentPict,gMainPathList

put projPath(this proj) & "exiftool" into tPath
put HFStoPOSIX(tPath) into tToolPath
put replace(tToolPath," ","\ ") into tToolPath
put merge("[[tToolPath]] -h") into tCmd
put HFStoPOSIX(line gCurrentPict of gMainPathList) into tFilePath
put shell(tCmd && tFilePath) into tData
put replace(tData,"<tr><td>","") into tData
put replace(tData,"</td><td>",colon & tab) into tData
put replace(tData,"</td></tr>","") into tData
put tData into cd fld 1
end mouseUp


ExifTool Version Number: 7.74
File Name: DSCF0397.JPG
Directory: /Users/terry/Desktop/Cornwall
File Size: 1158 kB
File Modification Date/Time: 2008:09:07 08:56:08+01:00
File Type: JPEG
MIME Type: image/jpeg
Exif Byte Order: Little-endian (Intel, II)
Make: FUJIFILM
Camera Model Name: FinePix F650
Orientation: Horizontal (normal)
X Resolution: 72
Y Resolution: 72
Resolution Unit: inches
Software: Digital Camera FinePix F650 Ver1.00
Modify Date: 2008:08:24 11:40:09
Y Cb Cr Positioning: Co-sited
Copyright:
Exposure Time: 1/400
F Number: 4.5
Exposure Program: Program AE
ISO: 64
Exif Version: 0220
Date/Time Original: 2008:08:24 11:40:09
Create Date: 2008:08:24 11:40:09
Components Configuration: Y, Cb, Cr, -
Compressed Bits Per Pixel: 2
Shutter Speed Value: 1/388
Aperture Value: 4.4
Brightness Value: 8.9
Exposure Compensation: 0
Max Aperture Value: 2.6
Metering Mode: Multi-segment
Light Source: Unknown
Flash: Auto, Did not fire
Focal Length: 5.8 mm
Version: 0130
Quality: NORMAL
White Balance: Auto
Saturation: Normal
Fuji Flash Mode: Auto
Flash Exposure Comp: 0
Macro: Off
Focus Mode: Auto
Focus Pixel: 1408 1056
Slow Sync: Off
Picture Mode: Program AE
Auto Bracketing: Off
Sequence Number: 0
Color Mode: Standard
Blur Warning: None
Focus Warning: Good
Exposure Warning: Good
Flashpix Version: 0100
Color Space: sRGB
Exif Image Width: 2816
Exif Image Height: 2112
Interoperability Index: R98 - DCF basic file (sRGB)
Interoperability Version: 0100
Focal Plane X Resolution: 4926
Focal Plane Y Resolution: 4926
Focal Plane Resolution Unit: cm
Sensing Method: One-chip color area
File Source: Digital Camera
Scene Type: Directly photographed
Custom Rendered: Normal
Exposure Mode: Auto
Scene Capture Type: Standard
Sharpness: Normal
Subject Distance Range: Unknown
Compression: JPEG (old-style)
Thumbnail Offset: 4096
Thumbnail Length: 4416
Profile CMM Type: appl
Profile Version: 2.2.0
Profile Class: Input Device Profile
Color Space Data: RGB
Profile Connection Space: XYZ
Profile Date Time: 2003:07:01 00:00:00
Profile File Signature: acsp
Primary Platform: Apple Computer Inc.
CMM Flags: Not Embedded, Independent
Device Manufacturer: appl
Device Model:
Device Attributes: Reflective, Glossy, Positive, Color
Rendering Intent: Perceptual
Connection Space Illuminant: 0.9642 1 0.82491
Profile Creator: appl
Profile ID: 0
Red Matrix Column: 0.45427 0.24263 0.01482
Green Matrix Column: 0.35332 0.67441 0.09042
Blue Matrix Column: 0.15662 0.08336 0.71953
Media White Point: 0.95047 1 1.0891
Chromatic Adaptation: 1.04788 0.02292 -0.0502 0.02957 0.99049 -0.01706 -0.00923 0.01508 0.75165
Red Tone Reproduction Curve: (Binary data 14 bytes, use -b option to extract)
Green Tone Reproduction Curve: (Binary data 14 bytes, use -b option to extract)
Blue Tone Reproduction Curve: (Binary data 14 bytes, use -b option to extract)
Profile Description: Camera RGB Profile
Profile Copyright: Copyright 2003 Apple Computer Inc., all rights reserved.
Profile Description ML: Camera RGB Profile
Image Width: 2816
Image Height: 2112
Encoding Process: Baseline DCT, Huffman coding
Bits Per Sample: 8
Color Components: 3
Y Cb Cr Sub Sampling: YCbCr4:2:2 (2 1)
Aperture: 4.5
Scale Factor To 35 mm Equivalent: 6.1
Shutter Speed: 1/400
Thumbnail Image: (Binary data 4416 bytes, use -b option to extract)
Circle Of Confusion: 0.005 mm
Field Of View: 54.3 deg
Focal Length: 5.8 mm (35 mm equivalent: 35.1 mm)
Hyperfocal Distance: 1.51 m
Image Size: 2816x2112
Light Value: 13.6


It really does deliver the data. :D What would we do with it all?
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am


Return to Using Externals

Who is online

Users browsing this forum: No registered users and 1 guest

cron