Photoshop resize scans

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Photoshop resize scans Mon Jul 30, 2012 12:47 pm • by danfascia
Hi there,

I'm a new Hazel user and I'm trying to automate my film scanning batch workflow with Hazel to do the following:

Scan dumps TIFF on desktop which Hazel picks up and checks which device it came from. If a certain scanner, it needs to resize and scale down the DPI then import into Aperture.

Most of it I have running apart from the resize part as I know it needs a Photoshop Applescript which I really cannot figure out. Right now I have this which doesn't compile

Code: Select all
tell "Adobe Photoshop CS4"
   open theFile   
   tell theDocument
      activate
      resize image theDocument resolution 1600 resample method bicubic
      save
   end tell
end tell


But I admit, I don't really know what I am doing at this stage having never used Applescripts. Help would be appreciated.

Also, it will probably be a really slow process having PS open just to resize. Is there another way of automating a resize - perhaps with Quartz? or a command line tool?

Thanks

Dan
danfascia
 
Posts: 1
Joined: Mon Jul 30, 2012 12:41 pm

Re: Photoshop resize scans Mon Jul 30, 2012 3:08 pm • by Mr_Noodle
First off, please don't post questions to the tips forum. See the sticky article at the top of that forum indicating that.

I don't have an answer for you since I don't use PS but I suggest you search the forums as someone else might have already done this. Probably using something like imagemagick, I'm guessing.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Photoshop resize scans Sun Aug 05, 2012 5:18 pm • by rabdo
danfascia wrote:Hi there,

I'm a new Hazel user and I'm trying to automate my film scanning batch workflow with Hazel to do the following:

Scan dumps TIFF on desktop which Hazel picks up and checks which device it came from. If a certain scanner, it needs to resize and scale down the DPI then import into Aperture.

Most of it I have running apart from the resize part as I know it needs a Photoshop Applescript which I really cannot figure out. Right now I have this which doesn't compile

Code: Select all
tell "Adobe Photoshop CS4"
   open theFile   
   tell theDocument
      activate
      resize image theDocument resolution 1600 resample method bicubic
      save
   end tell
end tell


But I admit, I don't really know what I am doing at this stage having never used Applescripts. Help would be appreciated.

Also, it will probably be a really slow process having PS open just to resize. Is there another way of automating a resize - perhaps with Quartz? or a command line tool?

Thanks

Dan


You don't even need photoshop as the mac already has a command line tool to convert and resize images which works great with hazel.

sips -- scriptable image processing system.

I just run this shell script from within hazel:

sips -s format jpeg -s formatOptions 40 -z 750 500 "$1"

eg. This converts the image to jpeg at low quality (40) and resizes to 750x500 (ignoring aspect ratio)

The instructions are easy and shown below. It may not have all the bells and whistles of photoshop but it has plenty of command line options.
https://developer.apple.com/library/mac ... ips.1.html
Last edited by rabdo on Tue Aug 07, 2012 1:40 pm, edited 1 time in total.
rabdo
 
Posts: 1
Joined: Sun Aug 05, 2012 5:10 pm

Re: Photoshop resize scans Mon Aug 06, 2012 4:08 pm • by Mr_Noodle
Cool. Didn't know about this myself. Thanks for the tip.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion