Looking for a script that will size photos down and give unique filenames

Here's the challenge:
I have a bunch of photos that need to be sized down to three different types of thumbnails, each group of thumbnails needs to have a specific prefix to the filename while keeping the rest of filename in tact.
So example:
I start out with a photo 1400 x 933
That photo needs to be sized down to 3 different smaller sizes: 630 x 420, 210 x 140 and 140 x93 (all of those have the same aspect ratio as 1400 x 933). So far this is a simple Action in Photoshop.
The trick I can't figure out is that these photos need to have a specific file naming convention. Say for example the 1400 x 933 photo we start out with is named w_paul_001.jpg the other photos once sized down need to be: x_paul_001.jpg (for the 630x420), y_paul_001.jpg (for the 210 x 140) and z_paul_001.jpg (for the 140x93).
How I do dat?

This will do what you want:
var srcDoc = app.activeDocument;
var imgNum = srcDoc.name.substring(7, (srcDoc.name.length)-4);
var myJpgQuality = 12
var sizeArray = [
[1400, 933, "x_paul_"],
[630,  420, "y_paul_"],
[100,  100, "z_paul_"]
for (var i=0; i<sizeArray.length; i++)
  var shrinkWidth =  sizeArray [i][0];
  var shrinkHeight = sizeArray [i][1];
  var mySaveName = sizeArray [i][2];
  var id428 = charIDToTypeID( "Dplc" );
  var desc92 = new ActionDescriptor();
  var id429 = charIDToTypeID( "null" );
  var ref27 = new ActionReference();
  var id430 = charIDToTypeID( "Dcmn" );
  var id431 = charIDToTypeID( "Ordn" );
  var id432 = charIDToTypeID( "Frst" );
  ref27.putEnumerated( id430, id431, id432 );
  desc92.putReference( id429, ref27 );
  var id433 = charIDToTypeID( "Nm  " );
  desc92.putString( id433, mySaveName );
  executeAction( id428, desc92, DialogModes.NO );
  activeDocument.resizeImage(shrinkWidth, shrinkHeight, 72, ResampleMethod.BICUBIC);
  filePath = srcDoc.path + '/' + mySaveName + imgNum + '.jpg';
  var jpgFile = new File(filePath);
  jpgSaveOptions = new JPEGSaveOptions();
  jpgSaveOptions.formatOptions = FormatOptions.OPTIMIZEDBASELINE;
  jpgSaveOptions.embedColorProfile = true;
  jpgSaveOptions.matte = MatteType.NONE;
  jpgSaveOptions.quality = myJpgQuality;
  activeDocument.saveAs(jpgFile, jpgSaveOptions, true, Extension.LOWERCASE);
  app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

Similar Messages

  • I'm looking for an app that will allow a presenter to give ipads to several other users in a room and control what's on display for the group

    please let me know if you know of any good apps to sync up several ipads in a room with one person in control. I'm looking for an app that will allow a presenter to control what's on display for several other ipad users in a room. I'd like to be able to do presentations over the ipad, but i want the presenter to control the screens so folks in the meetings don't get distracted by playing with the ipad. i'd like to avoid using a web meeting service and do this without having to connect to any kind of network since i'll often be doing this outside of my office.

    Try http://mysyncpad.com/. I'm not sure if it will do all you need, but it's the closest I've seen.

  • Looking for an app that will edit photos like Skitch

    This is probably the wrong place to put this but maybe I can get help with finding a better than app like Skitch for photo manipulating.
    Skitch is close but there are a few things I don't like and find it hard to use for my purpose.
    I like to be able to change file name, adding arrows with narrative, and resize using pixel count and not percent.
    An example would be FastStone Image viewer for a PC. Actually this has much more than I need but it is a good program.
    Thanks
    LarryB

    What system is your MacBook currently using?
    Some of the titles formerly available had not been updated to later OS X systems, and a few that I liked, do not appear to be available anymore from their authors source pages to download.
    One I liked for a few years, went by the odd name 'ToyViewer for Mac, version 5.1.1' - free - & was in a 6.5GB download zip file. I saved the file but it was said to be for Leopard 10.5.x and a different one at the time was available for Tiger 10.4.11. Somewhere I probably still have a zip for the earlier Tiger version 4.x. in an archive.
    There may be something out there that isn't a high-end image editor or image manipulator, at a fair price. Names like Acorn, Pixelmator, Graphic Converter, and then there's Gimp... are out there; plus a monthly fee to use some photoshop? 
    see: image editor free= https://www.google.com/#q=mac+os+x+image+editor+free
    Years ago, I'd found I can resize, edit, rotate and whatever on the desktop of my almost antique Mac in the Finder, using screenshots. Also to view an image, I can open a browser (mine go nowhere on launch) and drop in the image; then pull the window larger or smaller and the image fits that size automatically. I can screen capture in Finder. And the saved captures are .jpg since I changed the default, because .png did nothing for me.
    That method plus  'ToyViewer for Mac' (leopard version, may work in snow leopard) has worked fine for me. Beyond my needs, actually. And I've seldom used the included Image Capture application in the OS X, and manually save images from digital camera into folders, so I avoid iPhoto's intervention and storage ideas totally. Even though it is installed.
    If I were in the area, I'd give you a copy of the zip for ToyViewer v 5.1.1. (Maybe it won't work in SL10.6.8.) It can do more than expected for what was a free license application by an author in japan. His page is gone...
    PS: yes, the system default viewer, Preview, can do quite a bit.
    And so do screencapture keyboard shortcuts in Finder.
    Good luck & happy computing!
    {edited 3x}

  • Looking for a script that will find broken links

    I create long documents in InDesign, and I often have 50-75 Indesign documents in my InDesign book. Because what I do is production publishing, at any one time I'll have a half dozen similar books under construction. All the books contain the same chapters (as far as file name an basic content). I need a script that I can run on the final PDF for each project to make sure that all of my hyperlinks/cross references are intact. This is to ensure that I didn't accidentally link to a chapter from a different project. In other words, I need to make sure that my final PDF contains both the source and the destination.
    Does anyone know where I can find a script like this?
    Thanks,
    Kelly Vaughn

    A script can't do that. Maybe a plugin.

  • Looking for a script that will save as v11

    I need to save a book and all its files as version 11 (from version 12)

    Hi Dave,
    I have a script that saves to any FM version above 7 (and including MIF format, too). The script optionally copies all images to a local folder and optionally also includes text insets in the save. I know I sent you another script a couple of weeks ago, but I did not keep your email address. If you send the adress to me again I will forward a binary version of the script (the script source is something I am thinking of selling at a later stage and there was a lot of work on it, so I am a little less generous on that).
    Not sure if I have the latest version of the script on my laptop (I am on a business trip this week) but I can send you the script by Saturday at the latest.
    Kind regards from Copenhagen
    Jang

  • Looking for an App that will hold Word Docs and allow editing

    Does Pages satisify this need?

    You are welcome. Glad I could help. Thanks for marking my reply with the solved check mark.
    Allan

  • Looking for a crop that will allow me to keep all the heads the same size

    looking for a crop that will allow me to keep all the heads the same size. Iam a School photographer and have been looking for a crop tool mask out liner ect that will alow me to crop and see that head sizes remain the same throught out a job can any one help with this question?

    I *think* I'm understanding that Eisenray is asking. Similar to the crop overlays, like Grid or Spiral, he would like one with an oval, to help hi better size the heads in the photos. I believe in each photo, the heads have to be the same size.
    What he *could* do, is create a rectangle with an oval punched out of it. He could drag the image to an 8x10 300ppi document, and that rectangle can be overlayed on his photo, then he can shrink/enlarge the photo to fit the oval...if that makes sense.
    It's difficult to understand, do if I'm wrong, please let us know, Eisenray.

  • Looking for a script that get images' urls from a website

    Hi,
    I have a website where users can insert theirs hotel informations.
    Most of them do not insert photos, I guess because the procedure is quite long and difficoult for the average user's skills.
    I'm looking for a script that take as input the url of the website and give as output the urls of the images of the site, so the user can decide which to upload on his tab.
    Someone can help me?

    La_Salamandra wrote:
    I have a website where users can insert theirs hotel informations.
    Most of them do not insert photos, I guess because the procedure is quite long and difficoult for the average user's skills.
    I'm looking for a script that take as input the url of the website and give as output the urls of the images of the site, so the user can decide which to upload on his tab.
    Someone can help me?
    You have to improve your design. Even if you can find the Coldfusion code, your design will still fall short in 2 ways.
    First, it is unreliable, because you're depending on some arbitrary site to be available and up to speed. Secondly, it is aesthetically wrong to be collecting pictures, especially large numbers of them, dynamically from someone else's site.  Think of their copyright and bandwidth.
    Fortunately, there are simple solutions. First, identify, by eye, the web pages containing the pictures you're interested in. Ask for permission from the owner.
    You could indeed use Coldfusion's cfhttp or any other script to download the JPGs, PNGs, and so on. But then, why waste your time re-inventing the wheel? It is infinitely better to use a web crawler !
    With most crawlers, you only have to supply the URL of the site, and the file extensions it has to grab (in your case, jpg, png, bmp, and so on).
    One click on the button, and you have them reeling in. Automatically. Some crawlers are considerate enough to enable you to adjust the download bandwidth. (We can learn from a million years evolution wisdom. The vampire bat is known to inject a painkiller before sucking!).
    Now that you've downloaded the images to your site, the links you display to your users are all yours. You may choose to resize some of the images, display them as you wish, and the issues of reliability and bandwidth are now up to you.

  • I am looking for an app that will transcribe talking words into written words.  I have no idea where to look

    I am looking for an app that will transcribe talking words on a cd into written words in a file.

    Give Dictation a try.

  • LOOKING FOR AN APP THAT WILL ALLOW ME TO READ A PDF DOCUMENT OFF LINE

    My itouch has 8 Gb of RAM and I am looking for an app that will allow me to store a PDF document in memory and read it off line as there are times when I do not have access to WiFi. I can email myself the document but I am off line, I don't think that the inbox is an off line folder from which an attachment can be viewed off line, right? Therefore the reason I am looking for the ability to save and read off line.
    Thanks!!

    @x62
    I don't think that the inbox is an off line folder from which an attachment can be viewed off line, right?
    No, incorrect. The inbox is an *off line* folder, just as it is on a computer. Once you download the email from the server, it is in your iPod/computer and you can access it when you like.

  • Looking for an app that will manage all my business contacts (5,000 ) by company and then by name

    I'm looking for an app that will manage all my business contacts (5,000+). Want the app to categorize by company and then by name, kind of like an organization chart
    Ex.     Apple, Inc.
    -John
    -Sam
                                        -Nicole
    I just downloaded "FastContact" for free but its too slow while searching. After more research I saw "ABContacts" but don't want to pay $5 for something I may not be looking for.
    Any suggestions?

    The only thing available to you is the restrictiions section in settings.  Due to sandboxing, apps cannot interoperate with other apps except for sending data files from one app to another if allowed.  There is no app that will help you.
    Settings>General>Restrictions.

  • Looking for an app that will show me where my chil...

    I am Looking for an app that will show me where my children are (via gps on their phomes).  Looked in OVI store but came up empty.  Need the app to work on my E71x.
    Thanks

    I assume the kids have to leave their GPS on all the time draining the battery. What happens if they're in a building?
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Looking for an app that will alarm on specific text messages.

    Looking for an app that will alarm on specific text messages. The idea is to use the message as a pager without a monthly subscription. There is a similar app for andriod called firealert.

    I could not find any app that would do this. There are different types of message apps but nothing that I could find to do what I am looking for. For a specific contact I would like the message to have a notification that will not go away until I acknowledge it. Just like you would do if it was a pager.

  • Looking for an app that will allow my iphone3 to recieve VHF radio

    looking for an app that will allow my iphone3 to recieve VHF radio
    thank you
    Fabergebrut

    For what its worth, your iPhone does NOT contain a radio frequency antenna.
    Hope this helps

  • Looking for an app that will convert written chemical formulas to text. Any suggestions?

    Looking for an app that will convert written chemical formulas to text. Any suggestions?

    I could not find any app that would do this. There are different types of message apps but nothing that I could find to do what I am looking for. For a specific contact I would like the message to have a notification that will not go away until I acknowledge it. Just like you would do if it was a pager.

Maybe you are looking for