applescript to find non RGB images

Posted:
in Genius Bar edited January 2014
Oh great applescript gods, I need help again.



I've got folder, subfolders and subfolders of subfolders. Hiding inside all of these folders are tons of images in RGB except a very small number which are in CMYK. I need to find those CMYK images.



I see ColorSyncScripting has a color space property as part of the image class (?)



I'd like a script where I can select the top level folder and have the applescript go through every folder looking for images and if it finds one that is not RGB, write's it's name (and optionally it's path but as long as I have the file name, that's fine) to a simple text file on the desktop called Problem_Images or something.



Can anyone help me? I should be able to hack it together but I'm drawing a blank



If someone is kind enough to help, please check for the color space of the image not being RGB. I need to know which ones aren't RGB so I can fix them.



thanks

Comments

  • Reply 1 of 3
    jrollerjroller Posts: 80member
    Quote:
    Originally Posted by FreddyFredFred View Post


    Oh great applescript gods, I need help again.



    I've got folder, subfolders and subfolders of subfolders. Hiding inside all of these folders are tons of images in RGB except a very small number which are in CMYK. I need to find those CMYK images.



    I see ColorSyncScripting has a color space property as part of the image class (?)



    I'd like a script where I can select the top level folder and have the applescript go through every folder looking for images and if it finds one that is not RGB, write's it's name (and optionally it's path but as long as I have the file name, that's fine) to a simple text file on the desktop called Problem_Images or something.



    Can anyone help me? I should be able to hack it together but I'm drawing a blank



    If someone is kind enough to help, please check for the color space of the image not being RGB. I need to know which ones aren't RGB so I can fix them.



    thanks



    Don't think you need a script for that...



    In the Finder, key in Command F.



    In the window that appears you have the option to add parameters to your search. (BTW, you do NOT need to put any text in the search field.)



    First, click the plus sign on the upper right side of the search window. Choose Kind and Images in the option bar that appears. Next, click the plus sign to add another parameter. In the new option bar, choose Other..., in the ensuing drop down, select Color Space and then choose CMYK. The window should populate with all "Images" of Color Space "CMYK" in the item you've told it to search. Here is what the window should look like:



  • Reply 2 of 3
    jroller,



    Thanks for the tip. I didn't know I could do that. I rarely search for things on my computer and if I do, it's just for a filename.



    This depends on spotlight I'm guessing? I've turned it off on my machine at home so I'm not turning up any results. At work spotlight is still turned on so it will probably work as expected. We'll find out monday morning.



    Thanks for the great info... it's appreciated.
  • Reply 3 of 3
    jrollerjroller Posts: 80member
    Quote:
    Originally Posted by FreddyFredFred View Post


    jroller,



    Thanks for the tip. I didn't know I could do that. I rarely search for things on my computer and if I do, it's just for a filename.



    This depends on spotlight I'm guessing? I've turned it off on my machine at home so I'm not turning up any results. At work spotlight is still turned on so it will probably work as expected. We'll find out monday morning.



    Thanks for the great info... it's appreciated.



    That is actually a great question... I don't actually know if the Command F keys invoke a Spotlight Find or a different sort of Find. Maybe someone will enlighten both of us.



    There is actually a lot you can do with the Command-F searches; a good thing to know and keep in mind for future queries...
Sign In or Register to comment.