Disappearing iptc fields - script to lift and stamp metadata

Hi there,
I don't know if this is a general thing or not with Aperture 2.1, but in my library (all referenced images on 3 external disks) lots of not really recent photos get their thumbnails and previews updated anytime I browse the library. Although it slows down aperture a little, it's not really a big issue. The problem is that many older images lose their IPTC data upon refresh. It just disappears, leaving only the keywords in place. Caption etc are all gone. I have tried to update some of this manually, but as soon as I use reveal in an applescript, so I can lift and stamp metadata from another picture in the shoot, some more files get updated etc. etc. I don't really know what's happening here, probably a bug, but I've written a little applescript to update them automatically.
What it does:
It goes through all albums in the library (you can probably change this to something less granular if you only use projects as the basis of your library) and applies the iptc of one of the images with iptc data to the ones without it. It's not 100% error proof but works in my setup. The way it works is it puts all images in one of 2 lists, with and without caption information. It then gets the exif date and the iptc data from the last image on the list with captions and applies the iptc data to any image on the list without captions with the same exif date (to avoid stamping images from albums that have images from various sources.
My library is organized into folders with the name of the external drive the referenced images are on. It then contains projects (with or without a certain theme) and withing those projects are albums that reflect the directory the images on the disks are in. This is a leftover of my old days with iview media pro. All images are within an album. One last thing: Run the script from the Aperture menu. From the script editor it's very slow, due to large amounts of text passing through.
Anyway, here's the script, I hope it helps, maybe it can serve as an example for scripts like it:
-- create lists for photos with and without captions applied and references to the lists (supposed to be faster)
set imagenscomcaption to {}
set imagenssemcaption to {}
set refimagenscomcaption to a reference to imagenscomcaption
set refimagenssemcaption to a reference to imagenssemcaption
tell application "Aperture"
--get all albums of the main library, i assume pictures in albums are related to each other and captions from one image can be applied to another
set albumsdefotos to albums of library 1
repeat with contadordealbums from 1 to the count of albumsdefotos
set cadaalbum to item contadordealbums of albumsdefotos
set fotos to image versions of cadaalbum
--get the name of the album and display it
set nomedoalbum to name of cadaalbum
display dialog (nomedoalbum as string) & " - album " & contadordealbums & " of " & (count of albumsdefotos) giving up after 2
-- get all photos in album and put them in the right group, with or without caption information
repeat with contadordefotos from 1 to the count of fotos
set fotocorrente to item contadordefotos of fotos
tell fotocorrente
-- get all iptc tags and convert to string to be able to search without having to flip through all of them
set nomesdostags to name of IPTC tags as string
-- add to either list depending on having an iptc tag or not
if nomesdostags contains "Caption" then
copy fotocorrente to the end of refimagenscomcaption
else
copy fotocorrente to the end of refimagenssemcaption
end if
end tell
end repeat
display dialog (((count of refimagenscomcaption) as string) & " images with captions - " & (count of refimagenssemcaption) as string) & " images without captions" giving up after 2
--code to apply iptc tags of last photo in list with captions -if it exists- to all photos without them
if (count of refimagenscomcaption) is greater than 0 and (count of refimagenssemcaption) is greater than 0 then
--use last item of the list as source pic for iptc
set fotoorigem to last item of refimagenscomcaption
tell fotoorigem
try
set dataexiforigem to value of EXIF tag "ImageDate" as date
set dataorigem to my date_format(dataexiforigem) as string
set tagsorigem to IPTC tags of fotoorigem
on error
set dataorigem to "0000-00-00"
end try
end tell
--handle pics without caption, check image date first and as extra security only apply iptc of origin to destiny if the date is the same
repeat with contadordestino from 1 to count of refimagenssemcaption
set fotodestino to item contadordestino of refimagenssemcaption
tell fotodestino
set dataexifdestino to value of EXIF tag "ImageDate" as date
set datadestino to my date_format(dataexifdestino) as string
end tell
if dataorigem is equal to datadestino then
repeat with tagcorrente in tagsorigem
set nometag to name of tagcorrente
set valortag to value of tagcorrente
tell fotodestino
try
make new IPTC tag with properties {name:nometag, value:valortag}
end try
end tell
end repeat
end if
end repeat
end if
set imagenscomcaption to {}
set imagenssemcaption to {}
end repeat
end tell
--routine to format a date into yyyy-mm-dd
on dateformat(olddate)
set {year:y, month:m, day:d} to old_date
tell (y * 10000 + m * 100 + d) as string to text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8
end date_format

Hi there,
I don't know if this is a general thing or not with Aperture 2.1, but in my library (all referenced images on 3 external disks) lots of not really recent photos get their thumbnails and previews updated anytime I browse the library. Although it slows down aperture a little, it's not really a big issue. The problem is that many older images lose their IPTC data upon refresh. It just disappears, leaving only the keywords in place. Caption etc are all gone. I have tried to update some of this manually, but as soon as I use reveal in an applescript, so I can lift and stamp metadata from another picture in the shoot, some more files get updated etc. etc. I don't really know what's happening here, probably a bug, but I've written a little applescript to update them automatically.
What it does:
It goes through all albums in the library (you can probably change this to something less granular if you only use projects as the basis of your library) and applies the iptc of one of the images with iptc data to the ones without it. It's not 100% error proof but works in my setup. The way it works is it puts all images in one of 2 lists, with and without caption information. It then gets the exif date and the iptc data from the last image on the list with captions and applies the iptc data to any image on the list without captions with the same exif date (to avoid stamping images from albums that have images from various sources.
My library is organized into folders with the name of the external drive the referenced images are on. It then contains projects (with or without a certain theme) and withing those projects are albums that reflect the directory the images on the disks are in. This is a leftover of my old days with iview media pro. All images are within an album. One last thing: Run the script from the Aperture menu. From the script editor it's very slow, due to large amounts of text passing through.
Anyway, here's the script, I hope it helps, maybe it can serve as an example for scripts like it:
-- create lists for photos with and without captions applied and references to the lists (supposed to be faster)
set imagenscomcaption to {}
set imagenssemcaption to {}
set refimagenscomcaption to a reference to imagenscomcaption
set refimagenssemcaption to a reference to imagenssemcaption
tell application "Aperture"
--get all albums of the main library, i assume pictures in albums are related to each other and captions from one image can be applied to another
set albumsdefotos to albums of library 1
repeat with contadordealbums from 1 to the count of albumsdefotos
set cadaalbum to item contadordealbums of albumsdefotos
set fotos to image versions of cadaalbum
--get the name of the album and display it
set nomedoalbum to name of cadaalbum
display dialog (nomedoalbum as string) & " - album " & contadordealbums & " of " & (count of albumsdefotos) giving up after 2
-- get all photos in album and put them in the right group, with or without caption information
repeat with contadordefotos from 1 to the count of fotos
set fotocorrente to item contadordefotos of fotos
tell fotocorrente
-- get all iptc tags and convert to string to be able to search without having to flip through all of them
set nomesdostags to name of IPTC tags as string
-- add to either list depending on having an iptc tag or not
if nomesdostags contains "Caption" then
copy fotocorrente to the end of refimagenscomcaption
else
copy fotocorrente to the end of refimagenssemcaption
end if
end tell
end repeat
display dialog (((count of refimagenscomcaption) as string) & " images with captions - " & (count of refimagenssemcaption) as string) & " images without captions" giving up after 2
--code to apply iptc tags of last photo in list with captions -if it exists- to all photos without them
if (count of refimagenscomcaption) is greater than 0 and (count of refimagenssemcaption) is greater than 0 then
--use last item of the list as source pic for iptc
set fotoorigem to last item of refimagenscomcaption
tell fotoorigem
try
set dataexiforigem to value of EXIF tag "ImageDate" as date
set dataorigem to my date_format(dataexiforigem) as string
set tagsorigem to IPTC tags of fotoorigem
on error
set dataorigem to "0000-00-00"
end try
end tell
--handle pics without caption, check image date first and as extra security only apply iptc of origin to destiny if the date is the same
repeat with contadordestino from 1 to count of refimagenssemcaption
set fotodestino to item contadordestino of refimagenssemcaption
tell fotodestino
set dataexifdestino to value of EXIF tag "ImageDate" as date
set datadestino to my date_format(dataexifdestino) as string
end tell
if dataorigem is equal to datadestino then
repeat with tagcorrente in tagsorigem
set nometag to name of tagcorrente
set valortag to value of tagcorrente
tell fotodestino
try
make new IPTC tag with properties {name:nometag, value:valortag}
end try
end tell
end repeat
end if
end repeat
end if
set imagenscomcaption to {}
set imagenssemcaption to {}
end repeat
end tell
--routine to format a date into yyyy-mm-dd
on dateformat(olddate)
set {year:y, month:m, day:d} to old_date
tell (y * 10000 + m * 100 + d) as string to text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8
end date_format

Similar Messages

  • Bulk "lift and stamp" metadata?

    i have a series of pdf's that i would like to bulk attach metadata to. i would like to "copy" (or export) from one pdf which i have entered this data and then bulk "paste" into about 20 or more other pdf's.
    is there a way to do this and if so would someone mind telling me the terminology for this operation either inside or outside of Acrobat software?
    thanks.

    I was hoping someone else would chime in here, but unfortunately metadata never seems to draw much interest.  In the meantime, we lost power for almost a week, and I had to leave on a trip before it came back, resulting in gaps in my memory, both hard-disk and grey matter.  Perhaps you've already found a good way of working.
    Still, since you asked for advice, I'll say I am exceedingly wary of sidecar files: I've lost too many resource forks when moving files between systems, even Mac to Mac (mostly with fonts, but I dimly recall at least one Mac word-processor putting footnotes in the resource fork).  Image files are different, of course, and my knowledge of them is very limited, but if I had my druthers I'd find an image file format that permitted metadata to travel inside the file.
    PDF is such a format, thanks to XMP, but it isn't worry-free.  First, PDF was designed to hold documents rather than just images, adding complications.  And as I mentioned before, the internal file structure is so complex I'm wary of using non-Adobe tools to edit internal details.  Moreover, Acrobat's metadata tools are not as convenient as the corresponding parts of Photoshop, InDesign, and Bridge.  PDF might serve very nicely as the final format for distributing your work, but I'd consider delaying conversion to PDF until late in the processing.
    I've barely experimented with Photoshop Actions, but I expect they could be very useful for manipulating metadata on large numbers of images.  Bridge makes it easier to see what XMP metadata a file contains, and can be scripted to modify it -- and I assume you've been experimenting.  If you want to get down to the bare metal, EXIFTool is amazing; the fact that it runs at the command prompt can be intimidating, but it can chain a whole series of operations on a whole folder of files with great precision (but test carefully, because it is very powerful).
    While I still had access to my main computer, I experimented some more with exporting a sample PDF document's metadata to XMP, editing the latter, and then putting it back.  My sample was a scholarly article, all text (some Chinese), maybe 40 pages in length; it had gone through perhaps three rounds of editing in InDesign before I exported it to a PDF "weighing" 600 KB.  As an initial test, I had Acrobat 9 Pro strip the metadata ("optimizing" with only that setting) and was startled to find the file shrink by half.  Curious, I exported the metadata from the original PDF to XMP, where I noticed that one of the categories was something about history -- not a category listed in the windows behind "Additional Metadata" (though I could see it in the  "raw" view).  The text editor reported that this one category and its sub-branches took up something like 90% of the XMP file.  I carefully cut it out, imported the revised XMP back into the PDF, and the file seemed fine, though no smaller in size; I then "optimized" the file with Acrobat 9 Pro with all optimizations un-checked, to let Acrobat re-adjust the structure, and the size again dropped by half.  I go to this length to illustrate two points: first, XMP files can contain a lot of stuff you don't really want and that cruft may not be readily apparent; and second, to yield a more efficient PDF you may need to optimize it after tweaking the metadata.  In my case, I expect it would be simpler to delete unnecessary metadata in ID (and I plan further experiments once I get back in the office).
    To sum up, you may not get much help on metadata, especially on specific operations, so you just have to try stuff out and see how it works -- as I assume you have.  The Bridge scripting folks seem helpful, so I'd also look over there.
    Good luck,
    David

  • Can you be more selesctive with teh Lift and Stamp tool?

    I use the lift and stamp tool a lot. Mainly on metadata. The problem is that the metadata/adjustments come in categories. You can see all the info of the pic your lifting from, and you can choose to only lift & stamp keywords or just Iptc, Label, rating etc.
    My question is, can you select one specific field from these categories?
    For example right now I only want my pictures to share Caption, but keep the information of provider and content location which varies from image to image.
    is this possible?
    Thank you in advance
    Eleni

    I don't want to delete any of the IPTC info.
    I just want to lift Caption from IPTC and leave any other IPTC info untouched in both images (lifted and stamped)
    So the image I'm lifting has a different provider from the one I want to stamp but the should all have the same caption. How can I only lift and stamp the caption?
    thank you

  • To batch edit , with our lift and stamp

    is it possible to batch edit all my images with AUTO level, so that each pic will be edited independent RATHER than lift adjustment and Stamp the same adjustment , which will not work cause each pic needs a different level and white balance,,

    I don't want to delete any of the IPTC info.
    I just want to lift Caption from IPTC and leave any other IPTC info untouched in both images (lifted and stamped)
    So the image I'm lifting has a different provider from the one I want to stamp but the should all have the same caption. How can I only lift and stamp the caption?
    thank you

  • Batch changes don't function. Apt 3.2. From simple commands like "rotate clockwise" to "lift and stamp" the command only affects to the last image in the group selected. Similar problems? Solutions?

    Batch changes don't function. From simple commands like "rotate clockwise" to "lift and stamp" the command only affects to the last image in the group selected. Similar problems? Solutions? Suggestions? Thanks, Bruce

    Glad it helped. Everyone has been bitten by this at one time or another. Fortunately you only get bit once
    Well if you haven't already read it two or three times the User manual is really very good. Apple really did a nice job with it. The on-line version is nice because it is searchable.
    After that the Apple Pro Training Series book Aperture 3 is very useful. Its basically split into three parts. The library, adjustments and sharing. In addition if you get all the way through it you can take the Certification test and become, well certified.
    Rwboyer who posts here on and off has a good site and a couple of ebooks that I found useful.
    good luck

  • Lift and Stamp Question

    Let's say I made a white balance adjustment, then an exposure adjustment, followed by a little sharpening all in that order. But then I want to lift only the WB out of those three adjustments and stamp a batch of images.
    How can I stamp only the WB onto the selected images without stamping my exposure and sharpening adjustments? I tried a few things, but the images still get all the adjustments. One thing I did was uncheck the adjustments box in the L & S HUD and selected (highlighted) the WB, but that didn't give me what I wanted either.

    To do this display all the adjustments that you lifted by clicking the little triangle next to adjustments in the HUD. Highlight the one(s) that you do not want and press the delete key to get rid of them. After that stamp.
    More here:
    [Aperture lift and stamp|http://photo.rwboyer.com/2009/02/aperture-quick-tip-lift-and-stamp>
    RB

  • Lift and Stamp remains a mystery

    I have read the Soundtrack Pro manual, stared at the computer screen, read the manual again, clicked on everything that the manual says should be there (and ain't), scratched my head, read the manual again. STUMPED! Just how do you use the Lift and Stamp tool? I can't even get the bugger to show up. All I need to do is copy the effects (EQ settings) of one file to another without reinventing the wheel each time. You'd think such a thing would be a simple cut and paste. Please help, I know I'm probably stupid and it's all really obvious... BUT I'M LOST

    Thanks for your response Paul. It almost worked.
    Now I'm convinced it's me screwing something up. I seem to be able to copy the EQ settings OK using Process/Equalization Matching/Set Equalization Print from the source file. But when I try and copy the parameters to the target audio using Process/Equalization Matching/Apply Equalization - the Apply Equalization is grayed out and I can't apply it.
    Am I not selecting the audio file correctly? I use the Select All feature as double clicking seems to have no effect.
    Note: I am opening the files from within Final Cut Pro using the File/Send To/Soundtrack Pro Audio File Project route.
    Can you spot the obvious mistake in any of this?
    Thanks
    A

  • Lift and stamp image adjustments inconsistently working

    Just started playing with Aperture a few hours ago and seem to have intermittent problems lifting and stamping image adjustments. The manual has little info about lifting, beyond metadata, but sometimes I'm able to also lift image adjustments (color correction, crop, etc.). This was an advertised feature, so I assume the lack of info in the manual about lifting image adjustments is an oversight (or I am missing it). Unfortunately, I'm not usually able to lift image adjustments. They appear to be consistently availabel in the Lift HUD right after I make the adjustment to the image, but if I click away and then back, the adjustment is gone.
    I think it has something to do with the tiny icons on the lower-right part of some of my images. The one I usually see when I make some adjustments is a small white box with a left and right arrow on top of each other. This typically indicates that something isn't synched in other programs, but I don't know what needs to be synched in Aperture. The adjustments remain on the image when I click away and then back to it so they appear to be sticking.
    I've seen a couple of other icons show up in the lower right hand corner of images, but haven't been able to figure out what they mean. There doesn't seem to be mention of them anywhere in the Aperture documentation. Does anyone have a pointer or explanation of each of the icons' significance?

    OK, I got a bit of an answer from the instructional DVD. In the Image Adjusting section, they talk about lift and stamp. The problem is that you can't just select the image in the image browser, you have to click on the rendered image to lift the adjustments. It looks like you can also do this by option-clicking on the thumbnails.
    In the demo, though, they appear to lift and stamp a crop. I can't get anything other than color and luminance adjustments to show up in the list of possible adjustments to lift. Rotation, crop, etc. They're all ignored. Am I missing something?

  • Lift and Stamp - one image only

    I can get Lift and Stamp to work on JPEG images, but it only updates one image. So even if I select 10 and then stamp, only the image with the "thick" white border is updated.
    I've read lots of complaints on lift and stamp usability, but i think I'm doing this correctly.

    PRECISELY. I was in primary only mode. In this mode you do have to do what I describe, the "select first" doesn't work. Basically the approach I outline gets around "primary only" mode, so I'm arguably exploiting a design flaw.
    Better, of course, to turn primary-only off. Then you can select images and click stamp to update them all.
    If you type S instead of Ctrl-S for sharpening, you switch modes. I can't find any notice, if I owned Aperture I'd have a prominent string and icon appear in the menubar when switched to primary mode. I'd also remove the sortcut key! I don't think primary mode needs a single letter shortcut.
    I figured this out on my own, but if I hadn't you'd have answered it for me. Thanks!
    john

  • Lift and Stamp only RAW adjustments by default

    I would to be able to lift and stamp my raw adjustments from image to image without having to deselect each of the other metadata properties from the lift and stamp hud each time I restart Aperture. My exclusion of other metadata remains until I close Aperture. The next time I open it I am forced to once again open the hud and deselect unwanted metadata. Is there a way to set my desired lift and stamp method as a default?
    Thanks,
    Christoph

    I would to be able to lift and stamp my raw
    adjustments from image to image without having to
    deselect each of the other metadata properties from
    the lift and stamp hud each time I restart Aperture.
    My exclusion of other metadata remains until I close
    Aperture. The next time I open it I am forced to once
    again open the hud and deselect unwanted metadata. Is
    there a way to set my desired lift and stamp method
    as a default?
    Thanks,
    Christoph
    Currently not... any time you life you are always going to get the full set of metadata from an image, so even making a template image without the metadata that always gets included would not help much I think.

  • Lift and Stamp tool not working so well? White images!?

    Here's a strange issue.
    I worked on an image yesterday. Today, I want to copy the adjustments to another image in the same project. When I use the Lift and Stamp tool to copy the adjustments, the new image turns completely white. Even though I checked the adjustments and they look the same as the original one, the new image is all white.
    Now the strange thing is when I adjusted another image today then used the Lift and Stamp tool, the adjustments copied over fine.
    The only thing I can see which is different from the image I adjusted yesterday is that I had Aperture send that image to CS4 and I edited a TIFF which I stacked back with the original file.
    I'll try to make a screencast available so you can see what's going on.
    Looks like Apple's going to need to update Aperture 3 before it really comes out.
    Antonio

    Thanks for your effort. I am stunned. Would be edifying to know what is happening! I thought it might be okay as I sometimes turn my image black after applying some change, but the black is only a temporary display problem as the image is correct the next time I go to use it; perhaps in my situation Aperture was busy generating new previews for presentation of the changes. Your white is certainly a different issue. Glad it's only an isolated incident and not happening for you on the other images.

  • When noise reduction is lifted and stamped, is the noise print remembered?

    let's say i have a bunch of clips in a multitrack project and individually noise reduce some of the clips using a unique noise print for each one. if i now want to use the noise reduction settings for one of the clips (but not the last one that i noise reduced) to lift and stamp onto another clip, does the lift and stamp tool remember the noise print that i used to reduce the noise in that clip and use it for the stamped clip? it seems like when i set a new noise print, it overwrites the previous one i had set. i was just making sure that when i select a clip to lift noise reduction from that was not the last clip i noise reduced, it doesn't use the noise print that is "current" from whatever clip i reduced last.

    jimjrpxxxxx wrote:
    lightroom 5 image looks different in libary mode to develope mode when noise/sharpening is applied
    I've not experienced this.
    jimjrpxxxxx wrote:
    noise/sharpening is applied and the changes do not exprort .
    Noise/sharpening not exporting is a known issue in Lr5.0.
    Consider Lr50 Export AutoFix until Lr5.1 released.
    Rob

  • Upgrade to Aperture 3.1.3 lift and stamp tool only will lift

    I upgraded to Aperture 3.1.3 and  the lift and stamp tool will only lift adjustments.  Anyone else having this issue.  Everything else seems to work fine.

    No, that was not the link I had wanted to post.  Thanks for the heads-up.  My apology to the board and to the OP.
    This is the link to another recent thread reporting problems/changes with the Lift/Stamp shortcuts after the 3.1.3 upgrade.
    The problem is that once the Lift tool is activated ("o") and an Image has been selected, the cursor does not change to down-arrow stamp tool, and clicking Images does not stamp them.
    Try this in Split View and let us know if it works.  For some (including me) this still works in Browser View.

  • Lift and stamp white balance broken?

    Hi everybody,
    I'm using the 3.0.3 with the latest ProKit and Core Image rendering update, and I'm working with Canon 5d2 images. Today I was working on arranging a set of shots for a pano stitch in another tool, and I noticed that my camera's AWB choices varied across the sequence.
    Thinking this would be easy to fix, I went to the image with the best color, put a check in the White Balance brick to "turn it on", and then lifted the WB adjustment. I stamped that adjustment onto the other 5 pictures, and the previews updated instantly to reflect the new color. However, the moment I move off and back onto any of the other images, the original (and varying) AWB settings are back in effect.
    (After fiddling with it for a few minutes, I eventually gave up and just manually typed in the temperature and tint values into each picture's brick because I needed to get going on this stitch.)
    Can anyone else confirm this bug?
    Thanks,
    Ben

    Thanks for your effort. I am stunned. Would be edifying to know what is happening! I thought it might be okay as I sometimes turn my image black after applying some change, but the black is only a temporary display problem as the image is correct the next time I go to use it; perhaps in my situation Aperture was busy generating new previews for presentation of the changes. Your white is certainly a different issue. Glad it's only an isolated incident and not happening for you on the other images.

  • Can't get lift and stamp tool working

    I simply can't figure out how to get the lift & stamp tool going. I keep reading and re-reading the manual. I have a loop on one track with some effects on it, and want to apply the same effects (with the same levels) to a loop on a different track.
    I click the clip whose effects I want to lift. The sound Palette opens up, but no properties are listed in the right of the Sound Palette box.
    Any tips on what I could be doing wrong?

    Update: I figured out that it only works on processed effects and not real-time effects. I see then that you're supposed to render the real-time effects as actions, but when I try to "Render to Action" the real-time effects, this option is grayed-out in the Process menu bar, so I am still unable to copy effects from the one track to another.

Maybe you are looking for