[AS] Batch find images with attributes

Hi!
I've done some applescripting with Indesign but scripting photoshop is new to me.
Problem:
Thousands of grayscale images in a folder. Some of them are not adjusted for print so i need to find images that has light values below 5% an dark values above 95% and move those images to another folder for later processing.
Also some of the images are too wide or too high so those should be moved to another folder for later use.
Can this be done with applescripting Photoshop or is there some other ways (application?)to do it?
Any ideas?
thanks
jukka

What kind of file types do you have? AppleScript has access to SIPS via 'Image Events' a GUI-less app this can check some attributes of files without you opening them (no .eps though). For your below 5% above 95% the only method I can think of at the moment would be to open in Photoshop and read the first and last 12-ish items of the histogram. Something like this would tell you if you have pixels in those ranges. Assuming an open grayscale image.
tell application "Adobe Photoshop CS2"
activate
set docRef to the current document
tell docRef
set docWidth to width
set docHeight to height
set docHistogram to histogram of channel "Gray"
set above95 to 0
repeat with i from 1 to 12
set above95 to above95 + (item i of docHistogram)
end repeat
set below5 to 0
repeat with i from 244 to 256
set below5 to below5 + (item i of docHistogram)
end repeat
if (above95 > 0) and (below5 > 0) then
display dialog "NOT OK Image"
else
display dialog "OK Image"
end if
end tell
end tell

Similar Messages

  • Finding images with keyword tags in PE 12 Organizer

    I am experiencing difficulties while finding images with keyword tags.
    I am using the Organizer of Photoshop Element 12 (French version) and I think I follow the procedure described in “ADOBE ELEMENTS ORGANIZER Help and tutorials” (page 168 in the English version or alternatively 150 in the French one), i.e. :
    In the Keyword Tags panel, I click the ">" symbol of the keyword of which I want to know the relevant images
    Whatever the search option (Select either Hide Best Match Results Show/Hide Close Match Results, or Show/Hide Results That Do Not Match), I am not able to select and show only the Best Match Results.
    Please note also that the Tip
    To automatically display close matches after a search, choose Edit > Preferences > General, or Adobe Elements Organizer 11 > Preferences > General, and select Show Closely Matching Sets For Searches, and then click OK.
    does not seem to work with Adobe Elements Organizer 12

    Thks
    You are right, my problem is to select only the close matches.
    Based on your comment, I am afraid it’s one of the recurring problem in PE whatever the version (PE11 or PE12)
    De : MichelBParis 
    Envoyé : vendredi 30 mai 2014 08:40
    À : Michel ROUSSEAU
    Objet :  Finding images with keyword tags in PE 12 Organizer
    Finding images with keyword tags in PE 12 Organizer
    created by MichelBParis <https://forums.adobe.com/people/MichelBParis>  in Photoshop Elements - View the full discussion <https://forums.adobe.com/message/6420729#6420729>

  • How do I batch resize images with different aspect ratios?

    How do I batch resize images with different aspect ratios?

    poa66 wrote:
    Landscape: I want result to be 1960 x 1103 px and 72 ppi whether the original is 300 ppi or 220 ppi and wether it is 2Mb or 10 Mb. Cropped centered top and bottom.
    There will be a set of Landscapes that that have a narrower aspect ratio the 1960:1103 that would also need the top and bottom cropped like all Portraits would could be.  You need to realize that center cropping Landscape image that have aspect ratios near 1960:1103 will usually produce acceptable compositions.  However Cropping wide panoramas and portraits will only produce acceptable landscape  1960:1103 composition occasionally.
    Here you will see what happens when image have aspect ratio the do not fit the desired aspect ratio.  Where Landscape  are forced to portrait and portrait forced to Landscape.  Here are two Collage I populated with a mixture of image  with different  aspect ratios.   One collage has all 3:2 Landscape places and the other 2:3 Portrait places.
    I create a 1 image 1960x1103 collage 72dpi and create those too. Note the landscape boy foot is cropped off 3:2 is narrow compared to 1960:1103

  • Find images with parent keyword tag only?

    I don't know how to describe this problem succinctly, so I don't know how to search for it in the knowledgebase or forums. Can anybody help?
    I want a keyword hierarchy with "US" as parent keyword of 50 states name keywords. I have many images with state keywords, but I also have some images that are tagged only with "US" but no state tag, as they are not specific to a state.
    How do I *easily* find only the images tagged "US" but with no state tags? Clicking on "US" in the keyword panel shows me all images tagged with "US" and all with state tags, but I just want the ones tagged "US".
    I can use "Find" to find "US" images NOT CONTAINING "AL AK AR AS AZ..." by enumerating all 50 states, but that's a terribly awkward way filter out images tagged with state names. I can't see a button or filter that shows only the images with a parent tag but without child tags
    Any ideas?
    Thanks ahead of time,
    Dave

    John, this seemed like a great idea.  I tried it, and it seemed to work.  There was an immediate problem because when there are lots of keywords it means a lot of scrolling and it can be hard to locate rail among rain rate rails etc. because the font is so small.  A second problem was that you are forced to mouse scroll - cant page down or up or use home or end. That can be a lot of scrolling. a third problem is that it seems you have to reselect flat view each time.
    a more serious problem is that it seems to have stopped working.  I'm not quite sure what i did but i have a keyword verb with 5 items and about 1125 child keywords (such as to sing to run etc.) for 1125 photos   i click on the verb arrow in the keywords so i bring up 1125 pictures of verbs.  now i go to metadata switch to flat view.  i can now see "verb" as a keyword in the metadata panel, but when i click on it, nothing happens - I still have 1125 selected photos.  Furthermore i cannot click on any other keyword in the metadata panel - that is nothing happens when i click.  if I return it to hierarchical view it is fine.  then Lightroom 4 64-bit stopped working.  when i restarted the program it was still in flat view and i was now able to click on the metadata panel and see appropriate collections.  then it stopped working again after i clicked on the keyword panel (but did not actually select anything).  in total i have about 3000 keywords and about 100000 photos on local and network drives.  it looks to me like flat view has some serious problems, but perhaps its something i am doing.... 
    i also have to say that even if it worked perfectly, i still might prefer other solutions because scrolling up and down for 3000 keywords can be tedious - its difficult to prevent overshooting and undershooting the mark.  if the keyword and metadata panels could be undocked that would probably be a big help.

  • Finding images with no keywords

    Is it possible to search the images stored through Lightroom 1.1 and find images without any keywords?

    When it is working. Some have found that particular function to be broken. Seems to be working with Build 352900 (Internationalization Build). Wasn't with 350273.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Batch resizing images with preview

    When I try to batch resize images in Preview I have an error message: not enough space reduce volume?

    File - Automate - FitImage
    or
    File - Scripts - Image Processor
    Both should do what you want.

  • Batch processing images with different dimensions

    Hi all!
    I've been trying to do this for a while and I'm stumped, so I'd like to know if it's even possible. I'm trying to fathom out how to create an action which…
    Takes a jpg
    draws a shape
    masks the image
    adds another shape
    So I can batch process a ton of images.
    I managed to do something like what I'm after but the thing I'm having trouble with is that the original images will have different dimensions.
    I have attached (via link) an example image which would be the original (start.jpg), one which would be the desired end result (done.jpg) and the .psd
    IF there needs to be a step in the middle of the action where I need to intervene and resize the flat image slightly to fit the canvas it'll still save a load of time.
    I know that opening and saving will be taken care of using the batch feature and the result only needs to be a jpg.
    Any input will be welcomed!
    Here are the working files - http://mikeebee.com/dl/action-test.zip
    Many thanks

    That's an interesting action, but I thought the expected output was different than what this action produces. First, I didn't think image cropping would have been ok (maybe the OP expects this or is ok with cropping). Secondly, I kept getting caught up in how the right edge was going to actually be skewed (as decreasing in size perspectively off into the distance). This action appears to just visually trick the eye (again which may be what the OP wanted or is ok with). Like I said, just that aspect alone is where I kept getting stuck in how this would be possible without some manual manipulation.
    If you take this image http://www.shan-dysigns.com/userForums/photoshop/stripes.jpg and perform this action, you will see how the right side doesn't actually get skewed (as I thought was part of the visual effect wanted). Still, this action is quite nice.

  • Batch processing images with histogram info

    I am using photoshop 7; I would like to know if I can batch process a group
    of images and generate the Histogram info of the images in a different directory then the images. I have tried to make a action to do this
    procedure but with little success. When I run the automate script all that I get is the histogram info of the first image. Is there a process for doing this or am I trying achieve something that can not be done. Any advise would be appreciated.
    thank you, Mark

    That's an interesting action, but I thought the expected output was different than what this action produces. First, I didn't think image cropping would have been ok (maybe the OP expects this or is ok with cropping). Secondly, I kept getting caught up in how the right edge was going to actually be skewed (as decreasing in size perspectively off into the distance). This action appears to just visually trick the eye (again which may be what the OP wanted or is ok with). Like I said, just that aspect alone is where I kept getting stuck in how this would be possible without some manual manipulation.
    If you take this image http://www.shan-dysigns.com/userForums/photoshop/stripes.jpg and perform this action, you will see how the right side doesn't actually get skewed (as I thought was part of the visual effect wanted). Still, this action is quite nice.

  • Finder - Images With Orientation Data

    Hi,
    I'd like to discuss the way Finder handles images/photos with Orientation data embedded in them. I have a portrait photo here. When I open it with Preview it appears the correct way up, with its longest dimension running vertically. The same is true for Cover Flow and Quick Look. All of these methods show the photo the correct way up. However, when I view the file in Icon View or in List View in the Finder, the photo appears on its side, with its longest dimension running horizontally.
    My question is, why is this happening? If Preview, Cover Flow, Quick Look and even Safari understand Orientation data, why doesn't the Icon and List View modes of the Finder? Is this intentional or something that Apple forgot to implement?

    You need to have an application like  EXIF Viewer for Mac OS X  to check the files once you've exported them with the various checkboxes checked:
    Happy Holidays

  • Batch placing images with filename as an editable caption?

    Howdy! Does anyone know if there is an easy way to place about 300 screenshots into ID CC on a multi-page document (obviously) AND capture each filename associated with the image as a text frame above it (or close to it)? I named my files as reminders for the copy I need to write to describe the screenshot and - boy - would this help a lot to avoid back and forth to refer to file names. I need to edit the copy associated with each image, which is why I need the text (filename) in a text frame. The file names are long. I know - not an ideal way to name files, but I had to do screenshots on the fly on someone else's computer and it's what popped into my head at the time. Thank you kindly!

    You're in luck. You can use the Object > Captions > Caption Setup to pick Name as the metadata. Then when you place the file turn on Import Options and check Create Static Captions.
    You also can create dynamic captions which pull other metadata from the images but it doesn't sound like that's what you need.
    Also you can read more about Captions in InDesign Help.

  • Problem with MIME repository (cannot find image with ReportDesigner)

    Hi,
    in our BW (BI7.0), on the SE80 (mime repos), i found the /SAP/BW/CUSTOMER/images i found the *jpg and other image files.
    But when i run the BEX Report Designer and try to add an image from that path, the BRD doesnt find any image.
    Tks
    CC

    Hi  Cristian,
    save image in ".GIF" format at SE80, MIME repository and try in BEX Report Designer.
    Best Regards.

  • Batch watermarking images with logo  - Photoshop Elements 9

    Can I apply a watermark/logo in the form of a png or by using the brush tool when batch process files in photoshop elements 9?

    There are multiple ways to add captions/watermark/copyright info in Photoshop Elements
    Below KB articales should be helpful in this context depending on your need and usage and expertise
    http://kb2.adobe.com/community/publishing/851/cpsid_85114.html
    http://kb2.adobe.com/community/publishing/851/cpsid_85127.html
    http://kb2.adobe.com/community/publishing/851/cpsid_85128.html
    Thanks,
    Garry

  • How to batch rename images with YYYMMDD-City-State, type of format

    I want to change the names of my files to YYYMMDD-City-State, type of format.. I tried using the file naming template but all that show on the photos is the date.file extension. What am I doing wrong
    Thanks
    Mike
    Message title was edited by: Brett N

    You need one other file name specification - such as original file number - because each file name needs to be unique, and the format Date-City-State alone doesn't create unique file names.
    In the Library Module go >Library >Rename photo, and in the box that comes up click on the small triangle on the right of the field. This will bring up the file name editor.
    In the file name editor you have to select four specifications for the file name. See screen shot:
    Click <Done> and save the preset.

  • Image with fill color

    Hi all,
    Is there any script which can find images with fill color applied?
    Please pass the JS code if anybody has.
    Thanks in advance.
    Tan

    Thank you all.
    It is difficult to me. Could you please provide me simple JS code.
    Thanks

  • I am using a Photoshop cs2, and I wonder if it is possible to keep the settings of the guidelines when closing an image, with the actual document ? It would be nice to have the guidelines locked down, I find it than when opening the same or another image,

    I am using a Photoshop cs2, and I wonder if it is possible to keep the settings of the guidelines when closing an image, with the actual document ? It would be nice to have the guidelines locked down, I find it than when opening the same or another image, the guidelines are not locked, it is annoying to have to lock them down again. and it would actually be nice, to ba able to give specific directions when placing the guidelines. Thanks

    Then why are the guides unlocked when I reopen a document that I saved with the guides locked ?
    Thanks.

Maybe you are looking for

  • Slow WI-FI transfer using native YouTube application on the iPhone 3G

    Hello all, I have seen several posts similar to the one that I'm making now, but since my newest discovery brings a small twist to the issue when compared to the other cases, I decided to make a new thread. My issue is with the native YouTube applica

  • Advise needed in regard to iCloud storage 5GB

    Can anyone please advise me in regard to the iCloud storage of 5GB: I have 2 devices using iCloud: iPad and iPhone. iCloud has said to me it is almost full and I really am not sure why? I have deleted all music from the 2 devices, hoping this would f

  • PSE Version 8.  Error message 150:30

    I have an iMac running OSx 10.9.3 and Photoshop Elements v8.  However, when I attempted to open the program today I received a message saying the following:  Licensing for this product has stopped working.  This product has encountered a problem whic

  • ASDM Launcher doesn't work on Win7 64 bit after reinstalling Win7

    Reinstalled Win7 64bit and have been unable to get the ASDM launcher to work.  I can connect to multiple ASAs via HTTPS.  If I install the ASDM from v6.3.4 or 6.4.5, the launcher for that specific device works fine using: C:\Windows\SysWOW64\javaws.e

  • WS_FILENAME_GET, GUI_UPLOAD, charactors problem.

    Hi All, I use WS_FILENAME_GET to read a text file , and GUI_UPLOAD to upload the text content in to an internal table. When i run it on a English version of Windows, there is no problem, whereas in a Chinese version of Windows the uploaded charactors