[Gimp-developer] newb questions re python-fu

paul taney paultaney at yahoo.com
Mon Sep 22 08:29:30 PDT 2008


Hi,

A coupla questions from the newb...

I am trying to write my first python-fu plug-in and I cannot get it to install.  Here"s how I am pushing it to the plugins dir:

  cp VanDerWalt.py ~/.gimp-2.4/plug-ins/python-fu-vanderwalt.py
  chmod +x ~/.gimp-2.4/plug-ins/python-fu-vanderwalt.py

Then I look for it under <Image>/Filters/Render/  and it is not there.


It"s a color filter that attempts to extract the bluest pixels, 
like this:

<code>

  RED, GRN, BLU = 0, 1, 2
  bluemask = (image[...,BLU] > 1.4*image[...,GRN]) & \
	     (image[...,BLU] > 1.4*image[...,RED])
		
  blue_layer = gimp.layer(bluemask, width, height, RGBA_IMAGE, 100, NORMAL_MODE)
  image.addlayer(blue_layer, 0) 

</code>

Q1) Is this even close?
Q2) can I continue to use numpy (as I was with wx.Python) or do these images have to be treated with scipy?


This is a volunteer project for the International Environmental Data Rescue Org (http://iedro.org), so if somebody wants to help me with it... the script is attached though it has not run yet  :-o

It is for converting rasterized weather charts (stripcharts) to vector data for weather modeling.

paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-fu-vanderwalt.py
Type: application/octet-stream
Size: 7474 bytes
Desc: not available
Url : /lists/gimp-developer/attachments/20080922/4682a11f/attachment-0001.obj 


More information about the Gimp-developer mailing list