DEEPAK.SURTI
  • Home
  • Blog
  • Mobile Apps
  • Open Source
  • Cool 3D Demos
  • About

Automator service to manipulate images

11/30/2011

0 Comments

 
Picture
For the images on this website that appear within a post, I wanted to ensure that the image fits within the post’s container div otherwise it looks kind of ugly. I tried the following CSS rule but it did not work for Firefox. (I do not even test on IE!)
.post img{width:100%}
Now even if this worked for all images, however I have varied image sources where I do not have a direct control over the image type and image size, the two variables that I want to control. I prefer that images be of PNG format with the width scaled to 500 px. That would work best for my website layout. However it is cumbersome and boring to convert each image by opening it in some image processing software like ColorSync or Preview, changing its type and scaling it to the desired dimensions.

For such tasks, automator comes to the rescue. It will be great if I have two options in the context menu that allow me to:
  • Convert the image to PNG type
  • Scale the image width to 500 px
With Automator, you can create a service for each of the above, since an automator service appears as a context menu option.

Creating an automator service

Please watch my screencast below to understand how to use Automator to create a service.
To summarize, open Automator, choose ’Change type of Picture’ action in the Library, add it to the Service while allowing a copy of the image to be created and choosing some destination folder. You can now see the context menu option 'Scale for my website'. Similary you can create an automator service to scale your image while choosing the action ’Scale Images’ from the Library.

This was neatly done with Automator and it appears to be a very useful utility.
Picture

Deleting an automator service

However the Automator app does not provide any mechanism to delete a service. In order to delete a service, just navigate to Library/Services in your home folder. Now just select the service that you do not want and Trash it.

automator-images.pdf
File Size: 207 kb
File Type: pdf
Download File


0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Picture

    Me

    I am a 3D graphics software engineer.

    profile for dmsurti at Stack Overflow, Q&A for professional and enthusiast programmers

    Archives

    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011
    May 2011
    April 2011
    August 2010
    January 2010
    December 2009
    September 2009
    August 2009

    Categories

    All
    Automator
    Books
    Code
    Continuations
    Css
    Drakma
    Education
    Express Card
    External Drive
    Html
    Ita
    Learning
    Life
    Lisp
    Mac
    Macros
    Mercurial
    Productivity
    Puzzle
    Reading
    Rss
    Simplicity
    Sudoku
    Work

    RSS Feed

    Picture
    me @ delicious
Powered by Create your own unique website with customizable templates.
  • Home
  • Blog
  • Mobile Apps
  • Open Source
  • Cool 3D Demos
  • About