Applying Image Effects to Preview Documents

The Preview application in Mac OS X Leopard offers powerful controls for editing color, keywords, and sizing atributes of images. If you’ve ever wanted to add the ability to apply special image effects to these image editing options, here’s a simple three-action workflow that lets you apply Quartz Composition Filters to images opened in the Preview application.

The workflow droplet will duplicate the dragged-on image and then apply a chosen Quartz Composition Filters to the copied using paramters set when the workflow is run.

CREATING THE WORKFLOW

The first step in the automation recipe will be to duplicate the current image document open in Preview. Launch Automator and create a new blank custom workflow document. Select the Files & Folders category from the Library list to reveal the actions designed to work with documents. Then locate and add theDuplicate Finder Items action to the workflow by dragging it from the Actions list to the workflow area.

The next step is to add the action for selecting and applying a desired image effect to the image. Select the Photos category, and locate and add the Apply Quartz Composition Filter to Images action from the related Actions list to the wrokflow.

Once you do, this drop-down warning dialog will appear. Automator is designed to warn you when you are adding an action that will permanently alter documents and provide you with an option to add a duplicating action to the workflow so that any alterations are done to a copy and not the original file.

Since this workflow begins with an action to duplicate the existing file, adding a copy process is not necessary. Click the Don’t Add button to finish adding the chosen action to the worlflow.

To enable the ability to select the image effect to apply when the workflow is run, click the Options buton at the bottom left of the action view and select the checkbox titled Show this action when the workflow runs.

The last step in the workflow will be to open the processed image in Preview, so locate and add the Open Images in Preview action from the currently selected Photos category action list.

The workflow is complete and you’re ready to save it. Choose Save from the File menu, and selectApplication from the File Format popup menu in the saving dialog. This will save the workflow as a self-running application that can be used as a droplet. Name the workflow Apply Effect to Copy and save it in a convienient location, such as an Applications folder in your home directory.

After the workflow has been saved, close its window in Automator, and locate the saved application on your disk. Drag its icon to the Dock to add it to the list of applications.

USING THE WORKFLOW

To apply an effect to an image opened in Preview, drag the image’s document proxy icon from the image document’s title bar…

onto the workflow’s icon in the Dock.

The workflow application will open and begin processing the dragged-on document file. The action view dialog for the Apply Quartz Composition Filter to Images will display. Select the image effect from the popup list and adjust any parameter options. Click the Continue button to apply the chosen effect to the image file.

Once the effects processing has completed (some effects make take a few minutes to complete), the processed duplicate of the dragged-on image file will open in Preview.

MAKING A VARIATION OF THE WORKFLOW

The workflow you created will always create a duplicate of the the dragged-on document file before applying an image effect. If you want the ability to process the dragged-on image without duplicating it first, create another workflow varient by opening the saved workflow in Automator by dragging its icon on the Automator icon.

Remove the first action in the workflow (the one that duplicates the file) by clicking its close box at the right of its action view title bar. The, choose Save As… from the File menu and save the workflow as an application named Apply Effect to Original in the same location as the previous workflow application. Drag its application icon to the Dock, next to the previous workflow application.

You can now apply additional effects to the already processed duplicate image file by dragging its document proxy icon onto the workflow application in the Dock.

JAVA 漫谈

狼君 09:35:54
昨天晚上,闲来无事,随手翻开<<Thinking In Java>>,刚好看到接口和抽象类一章,因为我本人看书时,经常爱看到哪里,嘴就要说出来,特别是有人在旁边得时候。
于是,我便随口一句:“什么是接口?”,片刻,我女朋友伸过来一只手,用食指和拇指捏住我得下巴,给了我一个深深得Kiss,然后头发一甩,回眸用深沉的口吻道:“现在知道什么是接口了吧!”,
^&*(&(&#$%%^@#!@.

蒙古草原狼 09:59:45
狼君,够强悍!

狼君 10:04:24
过奖过奖

jackyrong 10:16:11
,真人真事?

狼君 12:52:01
真的

jackyrong 13:07:08
,真的。。。。

狼君 13:16:20
really

金刚狼 13:36:29
啥呀。。。

Amigo 13:37:26
一夜狼君的浪漫故事

金刚狼 13:41:12
哈哈

HHFancy 14:31:42
一夜狼君 那你女朋友怎么表现她的多态哪?

14:32:26
用不同的体位来表现多态

shinesun 14:33:06
那继承呢?

14:33:30
继承当然是生BB

WHO IS GOD:谁是上帝

很多人都说顾客是上帝, 其实不然. 讲一个故事.

大学的时候和几个朋友接了一个项目, 是一个很小的项目, 我们是在学校的一个广告栏里看到的, 任务是修改一个现成的程序使其符合要求. 因为要求简单, 我和几个朋友就接了, 按要求一个星期修改完, 先付定金20%, 结束后给60%, 符合要求了给剩下的.

任务不是很难, 我们几个很快就在一个星期里完成了, 当然完成的也很好. 你看现在顾客是上帝, 我们得认真地为顾客服务, 一个星期后拿给客户, 客户不是太满意就是有点样式的问题, 我们也抓紧时间修改了一个, 收下了60%, 客户人还不错(开始以为). 因为客户什么都不懂, 我们替他把程序上传到服务器. 一切都很好. 不过似乎没有完,你看我们还有一个20%在客户手里呢. 所以现在客户还是上帝.没多久客户拿了一张洋洋洒洒的两页A4纸, 我们看了看大多数是样式修改什么的, 当然还有一些新的功能, 对于增加功能我们不能接受, 因为开始的时候是说好的只修改一些功能, 没有增加功能的, 不过顾客说不改就不给钱, 没有办法谁让顾客是上帝呢. 改…这一改改了差不多半个月, 而且顾客的要求越来越复杂, 越来越偏离最终的要求. 没有办法, 我们给他最后一个说明, 就是一次把要求给我们 不要改来改去的. 好 我们拿到了最后一份要求要求该, 看我们多为用户着想啊.