Simple Scale Workflow gives different results UI vs Script

Hi guys.
I am trying to make a simple scale workflow that automatically creates a series of versions of an image, upon a master image being added to a certain folder.

When running the flow from the UI everything works perfectly - but when running it simply from Automator / Apple Script it works - BUT the outputted images are of such a poor quality.

I have tried loops and hoops around delaying and timing - to make sure that the file is fully available in the “drop folder” - but the same happens.

Even when I beef up quality on all parameters - all I get is a size heavy file, with very poor and pixelated rendering.

What am I missing here?

Thank you for any pointers or ideas - or Error40’es

I am using the code from the documentation with slight variation (Automator calls “on run” not “on adding items…”) the added “waitUntilReady” has no effect on the quality of the output…

on run {input, parameters}
	set workflowPath to "/Users/asgerlaursen/rd.retrobatch"
	
	set readyItems to {}
	repeat with a in input
		set p to POSIX path of (a as alias)
		if my waitUntilReady(p) then set end of readyItems to (POSIX file p)
	end repeat
	if readyItems = {} then return input
	
	tell application "Retrobatch"
		set d to open (POSIX file workflowPath)
		tell d to execute input items readyItems
		-- optional: quit Retrobatch after processing
		-- quit
	end tell
	return input
end run

Flow:

(New users can only add one embedded file)

Example of the highest quality output… when using the script to initiate.

Can you email a sample image, as well as the workflow to support@flyingmeat.com?

I’d like to see what’s going on with it specifically.

And are attaching the Automator workflow to a Finder folder action?

-gus

Thank you August.

I have sent you an email

And replied.

For the benefit of all - the problem was that a connection between two nodes were going the wrong way and RB was getting confused about what the top of the graph was. RB needs to figure out the top so that it knows where to synthesize a Read Files node and insert that into everything.

A simple fix, but a non obvious one and I now have it on my todo list to make some sort of check to make sure what’s happening makes sense.

Thank you SO MUCH August!
Flipping the arrows / reversing the pipe fixed it.
And thank you for your elaborate email, helping me not just sort the problem - but also undestand the solution. :raising_hands:

Thanks

Asger

1 Like