Jump to content

Workflow to change image resolution


Recommended Posts

Hi all, I tried building an Automator or Shortcut or Alfred workflow and failed each time 😞.

 

My goal:

1. convert images to TIFF

2. change the resolution of the TIF to 300 DPI (either with sips or imageprep [?])

3. move source file in a subfolder called Archive.

 

I'm able to do step 1/2 with this shell script

imageprep -r 300 -f tif

 

But I don’t know how to do the rest… and / or get the selected files in the folder.

I also tried building a workflow with Alfred Automations

 

I think I'm turning in circle in my living room now. Any insight would be appreciated! 😅

Link to comment

On the assumption you're using a Universal Action to select the files in the first place it's actually reasonably easy to do what you wish. It's probably easiest if I point you to a workflow on the Alfred Gallery which should help with your programming. (Full disclosure: I wrote the workflow.)

 

Take a look at my Move to new folder workflow. You should be able fairly easily to adapt pieces of that. If your Archive folder is in the same location every time you use your workflow you can adapt the workflow so as not to prompt for the folder location each time, of course.

 

By all means post again if you still have problems.

 

Stephen

Link to comment
34 minutes ago, JolinM said:

I still don't know how to run my imagepre shell script with success in Alfred

You should be able to do that by linking your keyword to an Alfred Run Script action and then proceed from there. See here for Alfred help on reading environment variables (which will help you feeding the files into your script).

 

Stephen

Edited by Stephen_C
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...