Dec 31, '07 07:30:03AM • Contributed by: ben42
[robg adds: I haven't tested this one.]
|
|
|
An AppleScript to resize the longest side of an image
Dec 31, '07 07:30:03AM • Contributed by: ben42
It's easy to put together a batch process in Photoshop to resize all the images in a folder to a certain height or width. However, if some of the photos are portraits and some are landscapes, they end up at different sizes. This script determines which dimension is the longest one and resizes that dimension to the specified number of pixels (set by the user). Note that this hint requires Photoshop, obviously...
This is set to save the images as JPEGs -- if you want it to save them in some other format, just change the line Save as JPEG in live_folder to Save as TIFF..., Save as Photoshop format..., Save as Photoshop EPS..., etc. (See the AppleScript dictionary for Photoshop for a complete list of formats.)
[robg adds: I haven't tested this one.]
•
[14,186 views]
Hint Options
An AppleScript to resize the longest side of an image
Or you could just use the built in Photoshop tool: File -> Automate -> Fit Image...
An AppleScript to resize the longest side of an image
Just use 'sips -Z [size]' on the images... it has the same effect.
ImageMagick
Or you can use ImageMagick if you have it installed.
…or just use sips
This is true, but patniemeyer's suggestion doesn't require installing ImageMagick (sips is an interface to Apple's Image Events processing system).
Just type sips -Z 100 image.jpg --out image-thumb.jpg to achieve the same result as your command.
An AppleScript to resize the longest side of an image
Just a question...
In Adobe ImageReady CS2, the Image Size setting allows you to constrain by width or height and not enlarge the image if the original size is smaller than the constrain width/height. Is there an equivalent resize tool in Photoshop CS3? Here's a screenshot from ImageReady (note the Do Not Enlarge checkbox): http://img106.imageshack.us/img106/6618/imagesizezl3.png
An AppleScript to resize the longest side of an image
Sounds very useful to me but I am a newbie to scripts. Can someone fill me in on how to setup this script? Tried various adjustments but cannot get it to work. Could someone tell me how to modify it for say a longest side of 400 pixels...
An AppleScript to resize the longest side of an image
I think is better not to use Photoshop to do the resize when you have "Image Events" in the Mac Os X.
Here is a variation on the code found here (http://schinckel.net/2006/03/04/resizing-images-in-applescriptautomator/) but to handdle multiple files: --------------------------------------------------- global theImage tell application "Finder" set sels to selection end tell set theResult to display dialog "Select the short side size." default answer "450" set theAnswer to text returned of theResult -- Retrieve the resize percentage amount set theNewWidth to theAnswer as integer repeat with sel in sels set theImage to sel as alias tell application "Finder" set theImageName to name of theImage as string set theImageFolder to (folder of theImage) as string end tell set theResizedImagePath to theImageFolder & theImageName & "_RESIZED" as string tell application "Image Events" launch set theImage to open theImage -- This is the tricky part: you need to keep the ratio of the original picture copy dimensions of theImage to {currentWidth, currentHeight} set ratio to theNewWidth / currentWidth tell theImage scale by factor ratio to size theNewWidth save in theResizedImagePath close end tell end tell end repeat ---------------------------------------------------
An AppleScript to resize the longest side of an image
Automator has this built into the resize image function, and its really handy. I drag stuff out of iphoto to the desktop, then have the resize image function as a contextual menu item. - should be built into email!
An AppleScript to resize the longest side of an image
i second spicyj's use of sips. it's quicker and easier than these applecsripts, which probably use sips to do the conversions anyway.
An AppleScript to resize the longest side of an image
is it possible to have an automater script that will convert nef files into jpg files but always keep the output file under 1mb ?
An AppleScript to resize the longest side of an image
An easy way to do this with photoshop batch/actions is to use the |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.19 seconds |
|