Re: [Gimp-user] python-fu: open image as layer

2011-08-09 Thread Jerry Baker
Try gimp-file-load-layer or gimp-file-load-layers... that may be it...

-Original Message-
From: Serghei MIHAI 
Reply-to: Serghei MIHAI 
To: gimp-user@lists.XCF.Berkeley.EDU
Subject: [Gimp-user] python-fu: open image as layer
Date: Wed, 10 Aug 2011 01:08:23 +0200


Hello everyone,

I try to develop a little python script for personal usage and I need to open
images as layers. I've googled and I found this message in the archive:
http://lists.xcf.berkeley.edu/lists/gimp-user/2008-April/012295.html.

But I don't find the pdb.gimp-file-open-layer function in my python console.

The function was renamed or moved to another module?

Thanks in advance,

---
Serghei MIHAI
Email  : serghei.mi...@devlibre.net
Jabber : sergiu.mi...@devlibre.net
GPG key: 4096R/BF2FA1AF
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Python-fu installation fails

2011-07-05 Thread kevin gilbert


On Wed July 6 2011 00:42:09 charlessmall18 opined:
> Sir, you are a scholar and a gentleman and all of the above worked like a
> charm and GIMP now starts just fine. However, I had all kinds of Python
> 2.6 stuff lurking on my PC. Here is how a hard-bitten (because I have 
been
> bitten hard many times by Windows) Windows victim...er...I mean Windows
> user cleans up his or her PC:
> 
> How to really un-install software.

1) Install Linux! ;)

Sorry, couldn't help myself. :blush:
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu script

2008-05-11 Thread Sven Neumann
Hi,

On Sat, 2008-05-10 at 18:57 -0300, Joao S. O. Bueno wrote:

> When caling PDB stuff from a python plug-in, the run-mode
> parameter is always omited and assumed to be "non-interactive"

That is a very bad design decision. How are you supposed to call a PDB
function interactively then?


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu script

2008-05-10 Thread David Gowers
On Sun, May 11, 2008 at 7:27 AM, Joao S. O. Bueno <[EMAIL PROTECTED]> wrote:
>> The drawable you are passing looks just right. But doesn't the
>> resynthesizer PDB procedure take run-mode as its first parameter?
>>
> When caling PDB stuff from a python plug-in, the run-mode
> parameter is always omited and assumed to be "non-interactive"

For the sake of completeness, I'll mention that you *can* use other
run modes, by specifying the kwarg 'run_mode'
like this

pdb.plug_in_gauss (i, i.layers[0], 4, 4, 1, run_mode = 0)

^^^
Brings up the normal interactive dialog.
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu script

2008-05-10 Thread Joao S. O. Bueno
On Sat 10 May 2008 11:00:57 am peter kostov wrote:
> Hello,
>
> I am trying to write a python script. The problematic part of it is:
>
> --- snip ---
>
> def run_resynthesize(image, drawable, vtileable=1, htileable=1):
>   defalut_args = (0, 0, 0, 0, 0.50, 0.12, 30, 200)
>   args = list(defalut_args)
>
>   pdb.plug_in_resynthesizer(image,drawable,vtileable,htileable,*args)
>
> def create_tileable(location, file_type_search, create_nmap,
> texture_name, normal_map_name, save_as_type, new_img_location):
>   images = get_images(file_type_search, location)
>   num_images = len(images)
>   for i in range(num_images):
>   image = pdb.gimp_file_load(images[i]['image_file'],
> images[i]['image_file'])
>
>   #drawable = PF_DRAWABLE
>   drawable = pdb.gimp_image_get_active_drawable(image)
>   #print drawable
>   run_resynthesize(image,drawable,1,1)
>
>
> --- snip ---
>
> I am getting a window listig several errors like this:
>
> Procedure 'gimp-drawable-width' has been called with an invalid ID for
> argument 'drawable'. Most likely a plug-in is trying to work on a layer
> that doesn't exist any longer.

Hi. You should check the parameters passed to the resynthesizer plug-in
I'd recomend testing it with one image from the python console, and check if 
the same error is raised

Once you have an image object, you can get it's top layer with
image.layers[0]  - no need to call pdb.gimp_image_get_active_drawable 

To work, from the python console, on an image already open in gimp, just
make a call to gimp.image_list()   - it return a list of all open images as 
python objects.

js
-><-
>
> And an 'RuntimeError: execution error' message on the console.
>
> I have googled, but not managed to find any answer :(
>
> How should I get the 'drawable' and what exactly should I feed to the
> resynthesize plug-in as 'DRAWABLE'?
>
> Please, please help!
>
> Kind regards,
>
> Peter


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu script

2008-05-10 Thread Joao S. O. Bueno
On Sat 10 May 2008 12:45:09 pm Sven Neumann wrote:
> Hi,
>
> On Sat, 2008-05-10 at 17:00 +0300, peter kostov wrote:
> > Procedure 'gimp-drawable-width' has been called with an invalid ID for
> > argument 'drawable'. Most likely a plug-in is trying to work on a layer
> > that doesn't exist any longer.
> >
> > And an 'RuntimeError: execution error' message on the console.
> >
> > I have googled, but not managed to find any answer :(
> >
> > How should I get the 'drawable' and what exactly should I feed to the
> > resynthesize plug-in as 'DRAWABLE'?
>
> The drawable you are passing looks just right. But doesn't the
> resynthesizer PDB procedure take run-mode as its first parameter?
>
When caling PDB stuff from a python plug-in, the run-mode
parameter is always omited and assumed to be "non-interactive"


>
> Sven
>
>
> ___
> Gimp-user mailing list
> Gimp-user@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu script

2008-05-10 Thread Sven Neumann
Hi,

On Sat, 2008-05-10 at 17:00 +0300, peter kostov wrote:

> Procedure 'gimp-drawable-width' has been called with an invalid ID for 
> argument 'drawable'. Most likely a plug-in is trying to work on a layer 
> that doesn't exist any longer.
> 
> And an 'RuntimeError: execution error' message on the console.
> 
> I have googled, but not managed to find any answer :(
> 
> How should I get the 'drawable' and what exactly should I feed to the 
> resynthesize plug-in as 'DRAWABLE'?

The drawable you are passing looks just right. But doesn't the
resynthesizer PDB procedure take run-mode as its first parameter?


Sven


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu and menus.

2007-04-16 Thread Michael Schumacher
John R. Culleton wrote:

> The only entry on the python submenu is sphere.py, which was there when I 
> started. 

They do not necessarily show up there - scripts and plug-ins can
register themselves in any menu they want (and with 2.3, an increasing
number of context menus as well)

Thus the register calls is what you have to look for in the scripts.

HTH,
Michael

-- 
GIMP > http://www.gimp.org  | IRC: irc://irc.gimp.org/gimp
Wiki > http://wiki.gimp.org | .de: http://gimpforum.de
Plug-ins > http://registry.gimp.org |
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu and menus.

2007-04-16 Thread Andrew
Renan Birck Pinheiro wrote:
> Em Seg, 2007-04-16 às 16:43 -0400, John R. Culleton escreveu:
>   
>> They were picked 
>> up as new plugins during the startup display but I still can't find 
>> them on a menu. 
>> 
>
> Then I don't know. Strange issue.
>
>   
I have the same problem, also Slackware 11, Gimp 2.3.13.

Andrew
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu and menus.

2007-04-16 Thread Renan Birck Pinheiro
Em Seg, 2007-04-16 às 16:43 -0400, John R. Culleton escreveu:
> They were picked 
> up as new plugins during the startup display but I still can't find 
> them on a menu. 

Then I don't know. Strange issue.

Since sphere.py shows up, it doesn't seem to be an issue with Python-fu
interpreter.

Do you get any strange output when running GIMP from a terminal?

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu and menus.

2007-04-16 Thread John R. Culleton
On Monday 16 April 2007 16:28, Renan Birck Pinheiro wrote:
> Em Seg, 2007-04-16 às 12:14 -0400, John R. Culleton escreveu:
> > There are several python-fu scripts installed but they don't show
> > up under the xtn menu or anyplace else I can find when running
> > Gimp.
>
> Did you put them in ~/.gimp-2.3/plugins and chmod +x them?
No. I had expected them to be picked up just as the script-fu plug-ins 
were. I did what you suggested and restarted Gimp. They were picked 
up as new plugins during the startup display but I still can't find 
them on a menu.  The only entry on the python submenu is sphere.py, 
which was there when I started. 

-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com



_
Need personalized email and website? Look no further. It's easy
with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu and menus.

2007-04-16 Thread Renan Birck Pinheiro
Em Seg, 2007-04-16 às 12:14 -0400, John R. Culleton escreveu:
> 
> There are several python-fu scripts installed but they don't show up 
> under the xtn menu or anyplace else I can find when running Gimp. 

Did you put them in ~/.gimp-2.3/plugins and chmod +x them?



___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: Re: [Gimp-user] Python-fu

2006-06-26 Thread Michael Schumacher
Von: "Joao S. O. Bueno Calligaris" <[EMAIL PROTECTED]>

> You can download and install gimp 2.3.9, pygtk, python-pango bindings, 
> and then it should work.

I want to add the you do not have to uninstall 2.2 in order to try GIMP 2.3 -  
actually it is recommended to keep 2.2 installed and use it for production work.


HTH,
Michael
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Python-fu

2006-06-26 Thread Joao S. O. Bueno Calligaris
On Sunday 25 June 2006 10:16 pm, Ben Conley wrote:
> I am trying to install the 'Inpaint' Python-Fu on GIMP 2.2.11 on
> Win32, but can't seem to do it.  I have Python (the newest version;
> just downloaded it last week).  Does anyone know how to get this to
> work?


You won't.
Python Fu doe snot work on windows with gimp 2.2

Just the development branch of the gimp has support for Python-fu 
under windows. 

You can download and install gimp 2.3.9, pygtk, python-pango bindings, 
and then it should work.

JS
-><-

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Python-fu script for Placement of pasted selections

2005-12-30 Thread Joao S. O. Bueno Calligaris
On Friday 30 December 2005 04:04 am, Joao S. O. Bueno Calligaris 
wrote:
> On Thursday 29 December 2005 08:43 am, Tristan Miller wrote:
> > 1. Store the top left coordinates (x,y) of the selection.
> > 2. Copy the selection.
> > 3. Switch to the second image.
> > 4. Paste.
> > 5. Move the selection to (x,y).
> > 6. Anchor the selection.


Hi,

Tristam wrote me to note that there are conflicting licencing terms in 
the "sel_transfer.py" script I attached in the previous e-mail.

Indeed, it is intended as public domain - but there are remaining 
comment lines from the plug-in I templated it from that say it is 
GPLed. 

It is such  simple script that I doubt anyone will actually be 
expanding on it. But in any case it is intended as public domain.

Regards,
JS
-><-
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu grid plugin

2004-10-28 Thread Sven Neumann
Hi,

"Joao S. O. Bueno Calligaris" <[EMAIL PROTECTED]> writes:

> I managed to fix it.
> I attached a patch to bug #156750 - 
> http://bugzilla.gnome.org/show_bug.cgi?id=156750
>
> The plug-in was just ignoring the alpha parameter passed in the calls, 
> letting in grabage in it's place. So, sometimes the call would work, 
> sometimes don't.

The fact that the script passes garbage is not exactly the fault of
the plug-in. Colors passed via the PDB do actually have an alpha
channel. But since this is a seldomly used feature and since the grid
API is documented to use the opacity values, your fix seems like the
right thing to do.


Sven
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu grid plugin

2004-10-28 Thread Joao S. O. Bueno Calligaris
On Thursday 28 October 2004 16:19, Joao S. O. Bueno Calligaris wrote:
> On Thursday 28 October 2004 15:00, Fernando Sancho wrote:
> > Hi
> >
> > I'm having problems with pdb.plug_in_grid. This function works ok
> > if applied on an indexed image, but fails (only draws vertical
> > lines) if applied on a RGB image.
> >
> > What's wrong?
>
> EEEK!! :-)
>
> Bug in the grid.c plug-in.
> I will see if it is something I can fix - anyway, if you want, you
> acan open a bugzilla bug for it already - bugzilla.gnome.org
>
> I already could verify it is not python-fu related - it is a
> problem in the plug-in itself.
>
> Regards,
>   JS
>   -><-
>

I managed to fix it.
I attached a patch to bug #156750 - 
http://bugzilla.gnome.org/show_bug.cgi?id=156750

The plug-in was just ignoring the alpha parameter passed in the calls, 
letting in grabage in it's place. So, sometimes the call would work, 
sometimes don't.

Regards,
JS
-><-
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] python-fu grid plugin

2004-10-28 Thread Joao S. O. Bueno Calligaris
On Thursday 28 October 2004 15:00, Fernando Sancho wrote:
> Hi
>
> I'm having problems with pdb.plug_in_grid. This function works ok
> if applied on an indexed image, but fails (only draws vertical
> lines) if applied on a RGB image.
>
> What's wrong?
EEEK!! :-)

Bug in the grid.c plug-in.
I will see if it is something I can fix - anyway, if you want, you 
acan open a bugzilla bug for it already - bugzilla.gnome.org

I already could verify it is not python-fu related - it is a problem 
in the plug-in itself.

Regards,
JS
-><-

>
> Regards.
> ___
> Gimp-user mailing list
> [EMAIL PROTECTED]
> http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Python-Fu scripts update

2004-01-14 Thread Przemyslaw Gawronski
Sorry, to bother, I learned that the scripts are read when they are ran.

-- 
Przemek Gawronski   gawronskip#at#wp#dot#pl
Linux Registered User 239544UIN:8358522
http://counter.li.org/
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user