Wednesday, August 19, 2009

Script-Fu: Save-It Plugin Improved

A while back I blogged about a Script-Fu plugin I wrote that simplified the saving of png files. The idea being that you edit and save your images as .xcf files and by hitting Control-P a PNG version is saved for you - no questions asked.

I've since improved this a bit to add support for saving a single region as png file with minimal hassle. The steps to do this reduce to:

  1. Create a selection (typically using the rectangle tool and guides to help)
  2. Hit Control+Shift+P
  3. Enter a suffix - for example: top
  4. Hit Enter

If the file above was named foo.xcf, the generated file would be foo-top.png.

The obvious use for this is extracting slices of images for web development. While I could have used the Slice or Guillotine plugins, I wanted something that was simpler and more precise.

Here's the code you'll need to drop into your scripts directory:

Here's the plugin in action:

3 comments:

  1. You are looking to promote your business online, you would be aware that online business requires a good website. A good website requires a good website design. A new design might be the correct answer and the right strategy for the success of your online business. A quality design can help your website seek the required attention from the customers. At the same time, it also gives you the confidence that you are projecting your products/services in the best possible way. http://www.infysolutions.com/resources/resources.html

    ReplyDelete
  2. Hi there - I am trying this plugin, it looks perfect. I am on Gimp 2.0 on Windows XP. The key command Ctrl-Shift-P does not work but the filter is available under Filter. Hmmm.... also where does the image get saved to?

    ReplyDelete
  3. Gwilym -

    Glad the plugin is working (whew!).

    You'll want go to the Edit Menu, then select Configure Keyboard Shortcuts, and then find the plugin under Plug-Ins.

    Also, the image should be saved in the same directory as the original file.

    Come to think of it, if you don't have an original file (such as a .xcf file), I'm not sure where it gets saved.

    Hope this helps!

    -Ben

    ReplyDelete

LinkWithin

Related Posts with Thumbnails