Stephen_C Posted November 26, 2022 Share Posted November 26, 2022 (edited) This workflow has no dependencies. It does make use of Automation Tasks so make sure your Automation Tasks are up to date! The workflow, which works as a Universal Action on a single, selected JPEG or PNG file: saves the original image in a temporary folder specified in the User Configuration; resizes the image file to the default longest side measurement specified in the User Configuration (measured in pixels); optionally allows saving of the resized image to the clipboard; at the end of the workflow provides an option to delete the saved original image. Note: The workflow does not enlarge images that already have a shorter longer side than specified in the User Configuration.Usage Select a single JPEG or PNG file in Finder, use your Universal Actions hotkey and choose Reduce size of JPEG/PNG file to run the workflow. You can download the workflow from Github. Stephen Edited November 27, 2022 by Stephen_C Corrected link. Then REALLY corrected link! Link to comment
TomBenz Posted November 27, 2022 Share Posted November 27, 2022 15 hours ago, Stephen_C said: You can download the workflow from Github. Stephen Hi Stephen, please re-check the link. It says not found. Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 1 hour ago, TomBenz said: Hi Stephen, please re-check the link. It says not found. Hmm - apologies. The link I inserted - and the edited link - work for me. Give me a little time and I'll try to find out what is wrong. In the meantime this link should take you directly to the v1.0 release. Sorry tor the inconvenience. Stephen Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 (edited) The original link is now corrected. So far as I can see, I inserted the correct link but the forum software appeared to be adding a rogue space on the middle of the link. In any event the original link should now work. Edit: It might well have been an issue my end! Stephen Edited November 27, 2022 by Stephen_C Clarification. Link to comment
TomBenz Posted November 27, 2022 Share Posted November 27, 2022 I could download and tried it. I get following in debugger log: [15:34:45.430] Reduce size of JPEG/PNG file[File Action] Processing complete [15:34:45.438] Reduce size of JPEG/PNG file[File Action] Passing output '/Users/pankajzawar/Downloads/0O9A0531.JPG' to Arg and Vars [15:34:45.440] Reduce size of JPEG/PNG file[Arg and Vars] Processing complete [15:34:45.442] Reduce size of JPEG/PNG file[Arg and Vars] Passing output '/Users/pankajzawar/Downloads/0O9A0531.JPG' to Automation Task [15:34:45.444] Reduce size of JPEG/PNG file[Automation Task] Running task 'Copy Path With the Finder' with arguments ( "/Users/pankajzawar/Downloads/0O9A0531.JPG" ) [15:36:18.533] ERROR: Reduce size of JPEG/PNG file[Automation Task] Task Error: /Users/pankajzawar/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/Automation Tasks/e836e59596edda8ea3956180f099e998e541ba3e6eca887b232a9954c0b24252:398:454: execution error: Finder got an error: AppleEvent timed out. (-1712) See if you can help to troubleshoot it. I am on Monterey Ventura 13.1 and also getting this apple event error for simple AppleScript tell application "Contacts" set aPerson to selection end tell Not sure if these are related. Alfred version 5.05 [2096] Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 1 hour ago, TomBenz said: I am on Monterey Ventura 13.1 @TomBenz I assume you mean you're running macOS 13.0.1 (as am I): is that correct? Have you set up (before running the workflow) the Temp folder referred to in the User Configuration for the workflow? Stephen Link to comment
TomBenz Posted November 27, 2022 Share Posted November 27, 2022 Yes, it is working well after setting the temp folder location. I am on macOS beta 13.1. thanks Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 I'm going to try to trap that error in a new version of the workflow (so that the workflow will detect if the user has not set up the Temp folder). Stephen Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 I have released version 2.0 which: checks for existence of the temporary folder and warns the user if it's not found; updates the Readme in the User Configuration to emphasise the need to create the temporary folder before running the workflow. Stephen Grug and TomBenz 2 Link to comment
Stephen_C Posted November 27, 2022 Author Share Posted November 27, 2022 With apologies for the rapid sequence of releases, but thanks to @vitor for the idea, I have released version 3.0 which now backs up to a tmp folder which is: created if it does not exist; automatically deleted when your Mac restarts. That means you should not ever be nagged about creating a temporary folder for the backup nor be encumbered with a temporary folder you do not wish to retain. Stephen Link to comment
alnetloc Posted December 19, 2022 Share Posted December 19, 2022 (edited) I have your Alfred workflow installed - seems like great idea and very useful tool. However, it is not doing anything for me. I have Alfred 5, and your version 3 of the workflow. I have configured to 500 pixels and identified an originals folder. However, when I pick an image file, and action the workflow app, nothing happens...literally. There's no error message, no flashing lights, no file created or moved into folder...nothing. Any advice or trouble-shooting you can recommend? Screen grab shows the file and workflow selected - from there, I press enter, then...nothing. Edited December 19, 2022 by alnetloc To add image and note at end. Link to comment
Stephen_C Posted December 20, 2022 Author Share Posted December 20, 2022 Would you please use the debugger utility and post the output here so that I can see the output when you run the workflow. Sorry for the problem but I have tested the workflow using your 500px setting and it does work for me so we need to discover why it's not working for you. Just check the User Configuration again to ensure that you saved the 500px setting (only an idea: sorry if it doesn't help!). Stephen Link to comment
TomBenz Posted December 21, 2022 Share Posted December 21, 2022 On 11/28/2022 at 2:24 AM, Stephen_C said: With apologies for the rapid sequence of releases, but thanks to @vitor for the idea, I have released version 3.0 which now backs up to a tmp folder which is: created if it does not exist; automatically deleted when your Mac restarts. That means you should not ever be nagged about creating a temporary folder for the backup nor be encumbered with a temporary folder you do not wish to retain. Stephen Hi Stephen, is it possible to update the workflow to process multiple image files together instead of one? thanks in advance Link to comment
Stephen_C Posted December 21, 2022 Author Share Posted December 21, 2022 That is in theory possible but it rather messes up parts of the workflow to do so. For example, you can copy only one image to the clipboard at a time. In the circumstances, and because it's rather easy to run the workflow on multiple files by selecting each individually and using the Universal Action hotkey, I hope you'll understand why I don't propose to change the workflow. Stephen Link to comment
TomBenz Posted December 21, 2022 Share Posted December 21, 2022 1 hour ago, Stephen_C said: That is in theory possible but it rather messes up parts of the workflow to do so. For example, you can copy only one image to the clipboard at a time. In the circumstances, and because it's rather easy to run the workflow on multiple files by selecting each individually and using the Universal Action hotkey, I hope you'll understand why I don't propose to change the workflow. Stephen Thanks Stephen Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now