octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: GIMP Octave Plugin


From: ElSamuko
Subject: Re: FYI: GIMP Octave Plugin
Date: Mon, 21 Dec 2009 12:58:06 +0100

2009/12/19 Søren Hauberg <address@hidden>
ons, 16 12 2009 kl. 01:42 +0100, skrev ElSamuko:
> I wrote a GIMP Octave Plugin which makes Octave scripts executable from
> inside GIMP.
> If you want to try it, go here:
> http://registry.gimp.org/node/21174

This is kinda neat. I haven't looked at the code, but I have a few
comments:

The plugin (or rather your filters) requires the 'image' package. This
is quite reasonable, but I guess it should be made more clear on the web
page.
Ok, I'll change this. Btw, the filters are not from me, but from Peter Kovesi:
http://www.csse.uwa.edu.au/~pk/research/matlabfns/


The 'Update' button in the UI changes when I resize the window. Try
making the window larger and things look not-so-good. It would be nice
if the button didn't scale.
I took the button from another plugin, I'll have a look at it.
 

Why do filters go in '~/.gimp-octave' and not somewhere in
'~/.gimp-2.6' ?
Scoping. I don't want to create/leave a mess in the GIMP dir.
And this folder doesn't change with new versions of GIMP.
But if you want another working folder, you can change it easily in the source code.

I would really love it if I simply got access to an Octave prompt, where
I had access to the image. From this prompt a function, say,
'send_image_to_gimp' should make the image available to gimp (i.e. save
it to disk). I often find myself in a situation where I would love to
experiment a bit with an image from within gimp, and getting easy access
to Octave make this dead simple.
You can access Octave via the script which is executed or directly with running Octave.
Just go with Octave in the ~/.gimp-octave dir after the plugin started and run the gimp.m script manually.
You have access to the image arrays then.
If you run GIMP via terminal, you even have the Octave output there.
 

It would be nice if the image was updated automatically instead of me
having to use the 'Update' button. Since you are using files to
communicate between gimp and Octave, I guess you should be able to do
auto-updating simply by watching file changes.
Ok, I'll see what I can do.
 

I don't think your code is safe when using the plugin on multible images
at once as you always save the result in 'matrixOut.txt'. You should be
able to solve this by calling the file 'matrixOut_XXX.txt' instead,
where 'XXX' is a number that is different from image to image.
These arrays are pretty big and I use them only to transfer the data from GIMP to Octave and back.
You may save them in GIMP as image or in the Octave script as matrix manually.
But I can add a line to the example Octave script which can be uncommented, if wanted:
save(strcat("matrix_", strftime ("%Y-%m-%d_%H-%M-%S",localtime(time)),".txt"), "matrixOut");
 
Anyway, this is a very interesting piece of work, that I think I'll find
great use of in the future.

Yepp, there is a lot of useful code out there.
Thx for C&C.
elsamuko
 
Søren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]