There are numerous ways to skin this cat using AppleScript… Here is an example that should show you what File/Image Data is available to MDLS & SIPS… You can use AppleScript's Image Events but it's pretty much SIPS in AppleScript classes… Both of these utilities will allow you to pull particular keys if you want or you can get the whole blob and parse in AppleScript… I guess you can sort the rest…
tell application "Adobe InDesign CS5"
tell the active document
set myGraphics to all graphics
repeat with thisGraphic in myGraphics
set imgType to image type name of thisGraphic
if imgType = "JPEG" then
set myFile to file path of item link of thisGraphic
-- Convert HFS path to POSIX for the shell
set myFile to quoted form of POSIX path of myFile
-- Use Spotlight metadata
set mdlsData to my mdlsImage(myFile)
display dialog (mdlsData) giving up after 3
-- Use Scriptable Image Processing System
set sipsData to my sipsImage(myFile)
display dialog (sipsData) giving up after 3
return (do shell script "mdls " & path)
return (do shell script "sips −-getProperty -g all " & path)
Thanks! This stuff I would of never found (or thought of). Though its not giving me the info I thought it would.
I changed the imagetype to "Adobe PDF" because those are the types I'm after. When run Im getting RGB profiles (space) on all the PDFs. The PDFs are either CMYK or grayscale.
I was hoping to get a CMYK space.
Its got to be the PDFs and how they are processed. They go through a process that changes the colors to CMYK. Acrobat output previews as CYMK? So I'm unsure how to distinguish CYMK PDF from a grayscale one?
Again Thanks, The code supplied is appreciated, and will give me more code to learn and play with
Your subject stated find *image* proprties… mdls is fairly generic file metadata… sips is for image data… PDFs can be a mixed bag of all sorts but in general a grayscale PDF is a cmyk PDF containing only data in the k plate is it not…?
Edit. Do you know what app created the *.pdf files…? If so I may be able to help with a different route…
I thought the image properties was the way to go, it would have the data I need, guess not. I figured the PDF was considered an image, and I didn't even think of how much stuff can be compacted into a PDF.
Yes a grayscale PDF is a cmyk PDF containing only data in the k plate is it not. So I need to find a way to get the CMYK values to use and compare..Internet search engine, here I come....This should be fun ;]
*.pdf, *.ai ( with PDF compatability to place in ID ) & *.eps files can contain all sorts of data… It is possible in some cases to find what plates they make… Do you know what created these files or are they mixed bag from every where…?
Their creation is a mix bag, but the all get processes through a central process (onevision Asura/distiller) which converts all the pdfs into to CMYK or grayscale (as well as a lot of other settings I'm not aware of). So I would hope that they then would contain consistant color info we could pull from them.