Finding image properties?

I'm looking for a way in applescript to get the properties of an image in a rectangle specifically its color space. I want to be able to place info about the image in a text box.
I can get the the images
set theimages to all graphics of page 1
but I can't get find the code that digs deeper into the individual images/graphic
Can anybody help?

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
                              end if
                    end repeat
          end tell
end tell
on mdlsImage(path)
          return (do shell script "mdls " & path)
end mdlsImage
on sipsImage(path)
          return (do shell script "sips −-getProperty -g all " & path)
end sipsImage

Similar Messages

  • How to view image properties in safari

    I would like to view properties of an image on a web page in Safari and cannot find this option anywhere.  I think it used to be under "View".

    Control click the page in Safari then click Inspect Element.
    Select Images on the left.
    Click through the images in the list. You'll see image properties on the right.

  • How to get image properties in PDF using javascript or plug ins

    Hi
    How to get the image(all the images) properties in PDF using javascript or suggest plug ins
    Thanks in Advance

    HI,
    In the PDF Edit API's ( as has already been suggested) there is the PDEImage and using this you should be able to find out everything you need to know about any image in a PDF file.
    I would recommend starting with PDEImageGetAttrs
    Hope this helps
    Malcolm

  • Image Properties - Swf

    I’m having Image Properties problems with Swf's.
    I’ve a screenful of pictures, a mixture of jpg’s &
    swf’s (used as thumbnails) that I want to:-
    1 Re-position
    2 Re-size
    With the page of Jpg’s/Swf’s displayed, if I
    click pause on control panel then:-
    With Jpg’s - there are no problems …
    Double-click on Jpg gains caret and opens Toolbox.
    2nd Double-click on jpg (or Ctrl+Shift+I or clicking 1st item
    on Modify tab) opens Image Properties. Can alter X1, X2
    co-ordinates and X Y size of jpg.
    Swfs – I can’t find a way to amend Image
    Properties
    Single-click on a Swf gains caret.
    Double-click on Swf opens Properties: Sprite Icon. Selecting
    the Layout Tab & setting Positioning = “On screen”,
    and it’s possible to amend the X Y co-ordinates of the Swf
    (These co-ords are mid-points X1+X2/2 and Y1+Y2/2). I can’t
    find any way to amend the Swf Image Properties controlling picture
    size (other than dragging swf to an approximate size).
    With Properties: Sprite Icon/Options, it’s possible to
    scale the image but this doesn’t help … reducing % size
    of Swf leaves overall size unaltered
    Is it possible to open Swf Image Properties and accurately
    “Size”a Swf or is dragging to approximate size the only
    solution?

    "TomWhite" <[email protected]> wrote in
    message
    news:gb0qtf$3vj$[email protected]..
    > I?m having Image Properties problems with Swf's. I?ve a
    screenful of
    > pictures,
    > a mixture of jpg?s & swf?s (used as thumbnails) that
    I want to:-
    > 1 Re-position
    > 2 Re-size
    >
    > With the page of Jpg?s/Swf?s displayed, if I click pause
    on control panel
    > then:-
    > With Jpg?s - there are no problems ?
    > Double-click on Jpg gains caret and opens Toolbox.
    > 2nd Double-click on jpg (or Ctrl+Shift+I or clicking 1st
    item on Modify
    > tab) opens Image Properties. Can alter X1, X2
    co-ordinates and X Y size of
    > jpg.
    >
    > Swfs ? I can?t find a way to amend Image Properties
    > Single-click on a Swf gains caret.
    > Double-click on Swf opens Properties: Sprite Icon.
    Selecting the Layout
    > Tab &
    > setting Positioning = ?On screen?, and it?s possible to
    amend the X Y
    > co-ordinates of the Swf (These co-ords are mid-points
    X1+X2/2 and
    > Y1+Y2/2). I
    > can?t find any way to amend the Swf Image Properties
    controlling picture
    > size
    > (other than dragging swf to an approximate size).
    > With Properties: Sprite Icon/Options, it?s possible to
    scale the image but
    > this doesn?t help ? reducing % size of Swf leaves
    overall size unaltered
    >
    > Is it possible to open Swf Image Properties and
    accurately ?Size?a Swf or
    > is
    > dragging to approximate size the only solution?
    SetPostSize.
    HTH;
    Amy

  • How do I find images in LR 2.4 (imported from CS4 Bridge) that have color labels already assigned In CS4 Bridge? I have set both Bridge and LR color labels text to match (eg Green for green, etc).

    How do you find images in LR 2.4 that have been imported from CS4 Bridge and have been assigned a color label in Bridge?  I have set both LR 2.4 and my CS4 Bridge to match the text for each color to be the same (eg. Green for green, etc), and the filter search in LR 2.4 shows that a label has been assigned, but I am unable to identify and locate the specific images in LR 2.4 that have had a color label assigned from CS4 Bridge.  I have tried to search via attribute, metadata, text, etc...Is it necessary to re-assign color labels all over again, image by image, in LR 2.4, or is there a way to automatically have the color labels assigned in CS4 Bridge be assigned and searchable to the images after they have been imported into the LR 2.4 catalogue from the Bridge program?

    JohnM.
    I closed both programs and re-imported photos and re-tried the action of having LR  read the XMP metadata from the CS4 files, and it seems to work now just fine...don't know why now and not before, but thanks much. Is there a way to have LR do this automatically upon import of images from CS4?  I tried to do this with an import metadata preset, but no luck.  It seems as if I can only do this once the images have already been imported into LR, and then to have to have LR read the metadata from the CS4 Bridge files.  thanks gain.

  • Lion 10.7.4 Console: Could not find image named 'ForwardArrow'.

    I found following message presented in syslog since today evening, however, the system is running fine so far.
    12-5-22 下午10:25:44.345 Console: Could not find image named 'BackArrow'.
    12-5-22 下午10:25:44.345 Console: Could not find image named 'ForwardArrow'.
    could someone to explain what was caused this error message? and how can I solve the problem

    It could mean that these two files are missing from the Console.app, where it should go into the folder Resources of the folder Contents. For some reasons, they don't seem to get installed with Lion under certain circumstances.
    Right-click Console.app (in the Applications/Utilties folder) and open those folders, then copy the two files BackArrow.png and ForwardArrow.png into the Resources folder).
    On my machines, this helped the messages go away (end even stopped some sporadic freezing :-)
    I just took the corresponding files from the Console.app of my previous Snow Leopard installation (same place).
    HTH

  • Image properties

    Anyone know how to extract image properties.
    I've a file upload which enables users to auto upload their photo.
    Restrictions on the upload need to be file size which I can do, and height/width to ensure the photo fits into a fixed window size. This is the bit I'm stuck on.
    The file upload uses jsp and java.
    Any help appreciated
    Thanks

    Please tell us more about your code.
    Do you have a Image or BufferedImage object at some point?
    If so can you use
    int w = yourImage.getWidth(null);

  • How can I compare a (partial) export folder from iPhoto to an event in iPhoto to find images not exported?

    How can I compare a (partial) export folder from iPhoto to an event in iPhoto to find images not exported?  Or better yet, how can I export selected events to a new iPhoto library or an existing iPhoto library with events, titles and keywords intact?

    Ask here:
    https://discussions.apple.com/community/ilife/iphoto

  • How to set image properties ?

    Dear All,
    I need your help to set image properties like (Title , Subject , Comments .... )
    thanks

    NVidia writes the DDS file format plugin, you need to talk to them about it.

  • Firefox can't find images that are there. ALL other browsers can!! Durrr - it just started happening on live an test websites to which there have been no changes

    Try www.avivastringquartet.co.uk
    You will not see pictures on the index.html page.
    Try it in Chrome,Opera, IE and all is fine
    Look at source and look for image by clicking on <img src="..."- says it can't find image.
    Also Firefox does not follow the CSS standard as the others do.
    Current OS is windows XP

    The pictures appear OK for me.
    With the site on display, click on the site identity button (for details on what that is see the [[site identity button]] article) and then on More Information. This will open up the page info dialog.
    First select the Permissions panel, make sure that "Load Images" is set to allow (selecting Use Default should also work)
    Next select the Media panel, then click on the first item in the list. Use the down arrow key to scroll through the list. If any item has the option "Block images from (domain name)" selected, de-select the option.
    This should hopefully resolve your issue, but also see [[Images or animations do not show]].
    Some add-ons can also block images, for example if you have AdBlock Plus installed, make sure that you have not accidentally created a filter to block the images.
    The encoding for the site is set to "UTF- 8" rather than "UTF-8"

  • Finding image in jar file

    This took me by surprise:
    I assumed that JVM would find image files, e.g. used in (JFrame).setIconImage(img) when these images are inside a jar file with the same path. I am using something like:
    Image   icon=jframe.getToolkit().getImage(img_path);what works when running JVM with class files and images in directories, but not when in jar file. img_path is relative. Classes will be found as expected, but not the image files!
    Do I do something wrong?
    Thomas
    Edited by: ThomasH_usually on Oct 1, 2008 11:48 AM

    I encountered this same problem before, whereby I wanted to be able to run my code from within an IDE (find image files from the file system) for development, and also to be able to run my code from within an executable jar (find image files from inside the jar) for release. I used the following utility method to get an image URL:
    public static URL getImageUrl(String fileName)
        // try to get the URL as a system resource
        URL url = ClassLoader.getSystemResource(fileName);
        if (url == null)
            // try to get the URL directly from the filename
            try
                url = new URL("file:" + fileName);
            catch (Exception e)
        return url;
    }You can then use the resulting URL instead of the image path, in your case as follows:
    Image   icon=jframe.getToolkit().getImage(Utils.getImageUrl(img_path));Paul.

  • Finding images that have not been tagged?

    How can I search/find images in LR4 that have been imported though not tagged?
    Thanks.

    There should be a Smart Collection called "Without Keywords" in the Collections Pane of the Library Module. That will automatically contain what you are looking for.
    If that isn't there, click on All Photographs then use the Filter Bar>Metadata and filter on Keywords....the top entry (None) will be what you are looking for.

  • Finding images that have been 'protected' while in camera

    Hello, I was wondering if anybody knows how to find images that you protect while they're in your camera? I have a Canon 5D Mark II, and I can select images to 'lock' or 'protect' .. I use that to mark images that I believe are key images while on a shoot.
    With Photo Mechanic I can select 'tagged' images .. and those images I have marked in my camera will be selected.
    I've tried to figure out if its something I can find in exif .. and have had no luck.
    Please help!

    There should be a Smart Collection called "Without Keywords" in the Collections Pane of the Library Module. That will automatically contain what you are looking for.
    If that isn't there, click on All Photographs then use the Filter Bar>Metadata and filter on Keywords....the top entry (None) will be what you are looking for.

  • IPhoto Image Properties

    Im totally confused about image properties and the effect on images when downloaded into iPhoto of different releases:
    I have Canon digital camera. I always shoot at max image and file size...not Raw.
    I had my MacBook on a vacation in Europe and pulled images into iPhoto (V6)every day to preserve in case of loss. I then made a daily CD for double keeping.
    When I returned home I wanted the images on my iMac so I loaded into iPhoto (V5) from the backup CD made from the MacBook iPhoto (V6).
    I noticed differences in image properties (file size and resolution) when opened in Photoshop so I did the following experiment:
    I uploaded from the camera the last set of images directly into the iMac (iPhoto V5). I then compared image properties between the same image, from the CD via the MacBook and from the camera directly...and the iMac direct loaded images were larger, 3.2 MB v. 2.3 MB. I also checked the direct loaded images on the MacBook (iPhoto V6) and it is also 2.3 MB. I concluded the CD had nothing to do with the image quality/size.
    It appears that iPhoto V6 for some reason loades the image as a smaller and thus lower quality image than the iPhoto V5 on the iMac.
    Can anyone explain where the differences are coming from...???
    iMAC and MacBook   Mac OS X (10.4.8)   PhotoShop and iPhoto
    iMAC   Mac OS X (10.4.8)   PhotoShop

    Welcome to Apple Discussions,
    What model of Kodak is it?
    There is a discussion thread on this topic: http://discussions.apple.com/thread.jspa?messageID=11942367&#11942367
    Try using a media card reader (sometimes built into printers) to see if that allows the import. Others seem to report having luck by importing the movies off the card using a different computer, deleting them, and then importing the pictures.
    Hope that helps.

  • Bulk Edit Image Properties

    I'm creating a site with numerous slideshows (sometimes with 50 pictures or more) and it's looking like the only way to enter the image properties is to click on each thumbnail image to bring it up at the top and then right click on it and go to image properties.
    Please someone tell me there's a better, more efficient way to do this!
    Thanks

    mykellysue, I think you may have misunderstood the original post and Sachin's reply. The original post was about setting the properties of an image (referring to alternate text and/or tooltip text). Those properties are normally set by right clicking on an image, selecting "Edit Image Properties" and entering the values. In this case the customer had many images. In that case you can select multiple images in the Assets panel and set their properties all at once.
    As far as how to use a Composition widget, a composition widget is made up of a set of related containers. A trigger container (which you click on or mouse over) and a target container (which appears in response to interaction with the trigger.
    For the most part you can put anything you want in the trigger container or the target container and you can add or remove pairs of containers to/from most Composition widgets.
    Some of the Composition widgets in the Widget Library panel contain sample content. Ultimately these are just samples. You can select and delete the sample content and drag in whatever is needed for your design.
    There are tutorials and videos available at muse.adobe.com.

Maybe you are looking for