• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resize and apply watermark to images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resize and apply watermark to images


  • Subject: Re: Resize and apply watermark to images
  • From: Benjamin Waldie <email@hidden>
  • Date: Thu, 11 Oct 2012 10:57:19 -0400

Hi Timothy,

On Oct 11, 2012, at 10:32 AM, "Hellum, Timothy" <email@hidden> wrote:

I am seeing some flakey behaviour with a Folder Action I am running on an Xserve (10.7.5).

The Folder Action watches a folder on an SMB-mounted share. When files are dropped into the watch folder, the Image Processor action (http://mac.softpedia.com/progDownload/Image-Processor-Download-72259.html - Softpedia download link) applies a server-local PNG file as a watermark and resizes the dropped image(s) to fit within 800 pixels.

Workflow:
1) Pause (10 seconds, to hopefully reach EOF for dropped files)

You could try using my Wait for Finder Items action, which is designed specifically to deal with this issue.  This action is part of my File and Folder Automator Action Pack, a commercial app available in the Mac App Store.  If you're using an OS older than Snow Leopard, you can find it on my website here: http://www.automatedworkflows.com/products/software/automator-actions-for-mac-os-x-10-510-6/.

2) Get Folder Contents

With a folder action, you don't need to get the folder's contents, unless folders are being added to the watched folder and you want to process their contents.  Otherwise, newly detected items are automatically passed to the folder action workflow as input.  So, you can probably remove this action from your workflow.

3) Image Processor
OUTPUT files to folder on SMB share adjacent to INPUT folder
JPEG out
Adobe (1998) colourspace
Fit within 800x800
Watermark (server-local PNG)
The primary issue is that when multiple files are dropped on the (SMB-mounted) watch folder from a user machine, some, but not all files will process - and its random.  The same group dropped a second time may process just the same few, or a different few - never the lot.  The test files are all smallish JPEGs - 1-2 megs in the Finder.  The quantity of dropped files is 3-8.  Files dropped one-at-a-time generally work fine - but not always!  Some of the singly-dropped files sit in the watch folder without processing (but if dropped a second time, they might process!).

Folder Actions sometimes have a knack for picking up files before they're done writing, and ignoring certain files.  I would try removing the Get Folder Contents action, to see if that helps.  Another option might be to create a scheduled workflow, which retrieves files from the folder in intervals, rather than triggering automatically when items are added to the folder.  I would also configure your workflow to immediately move the files out of the watched folder to a temporary folder while processing, to ensure they aren't picked up a second time for some reason.

Secondly, I am unable to get the Move Finder Items to Trash to work (to clear the watch folder), although I suspect that this is because the watch folder is on a mounted share and not local.

I'm not sure about this.  It could be that the Image Processor's output doesn't match the input required by the Move Finder Items to Trash action.  I'd try stepping through the workflow in Automator, and monitoring the results of each action to ensure they match what's expected.

Hope this helps.

-Ben

Ben Waldie
President
Automated Workflows, LLC
484.744.1831
=============================================
  AppleScript * Automator * Workflow Automation
  Products, Training, Custom Development Services
  <http://www.automatedworkflows.com>
  <http://twitter.com/applescriptguru>
=============================================




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Automator-users Digest, Vol 80, Issue 2
  • Next by Date: Re: Automator-users Digest, Vol 80, Issue 3
  • Previous by thread: Re: Automator-users Digest, Vol 80, Issue 2
  • Next by thread: Re: Automator-users Digest, Vol 80, Issue 3
  • Index(es):
    • Date
    • Thread