Tuesday, March 28, 2006

 

Script-fu

I don't think many people will understand this post, since it will be full of technical jargon.

Script-Fu is the scripting language used by GIMP. This allows tasks in GIMP to be automated.

Some of you may know that Sony cameras have a multi-burst mode. At least mine does. What it does is to take 16 pictures in quick succession, saving them to a single 1280*960 file, with each image having dimensions of 320*240. When played back on the camera itself or on Sony's Picture Package software, the small images will play back like a slow motion recording. I dislike having extra software on my computer, so I've never installed the picture package software. Creating animated GIF files in GIMP is easy, so I thought I'll just cut out the individual mini pictures and paste them into 16 layers and save it as an animated GIF.

This process is long and tedious. The manual method means I would have to select a 320*240 area at exactly the right coordinates 16 times. Then I would have to copy and paste it into a new layer each time. Next I would have to put in the timings in parantheses in the layer name. Actually, the last step is not really necessary as the save options allow a default value to be set, but then that would be an extra step during the save process.

So I thought I'll explore what Script-Fu can do. Using google, I found a couple of webpages giving the basics, such as where to save the script files and how to register scripts in gimp. They also mentioned the Script-Fu console and the procedure browser, both included with GIMP. The procedure browser was very useful, allowing me to find the necessary functions with minimal fuss. There were also very detailed descriptions.

In the scripts folder, I found a Selection to Image script that required no additional parameters, and contained a wonderful template for my own script. The copy and paste operations were already inside. I took quite a lot of the copy and paste code there and modified it for my own purposes. Script-Fu isn't exactly intuitive, especially with its mathematical operations and while loop condition structure, but by referring to examples, I was able to figure out how to get my block of code to loop.


hosted by applerings.com

This picture seems to only work in IE with Zonealarm turned off.

hosted by applerings.com

posted by cosine  @ 11:19 PM
Comments: Post a Comment



<< Home


Other Blogs

  • Christopher
  • Hock
  • Chee Hui
  • Joline
  • YH
  • Zhiqin
  • Kenny
  • J.X.
  • Tubby
  • Esther Goh
  • Sarah
  • Dwin
  • Licia
  • External Links

  • Image Host--Applerings
  • Google
  • Previous Posts

  • Rude shop
  • Platoon Cohesion
  • Chelsea vs Fulham
  • Dusk header pic
  • ORD Part II
  • New header pic
  • ORD loh!!!
  • 2 places
  • Civ 4 quotes
  • IT Show 2006
  • Archives

  • February 2006
  • March 2006
  • April 2006
  • May 2006
  • June 2006
  • July 2006
  • August 2006
  • September 2006
  • October 2006
  • November 2006
  • December 2006
  • January 2007
  • February 2007
  • March 2007
  • April 2007
  • May 2007
  • June 2007
  • July 2007
  • August 2007
  • September 2007
  • October 2007
  • November 2007
  • December 2007
  • January 2008
  • May 2008
  • July 2008