It is currently Mon Apr 21, 2014 5:36 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 274 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23 ... 28  Next
Author Message
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Feb 07, 2012 12:50 pm  (#191) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 596
Good catch! I had some old code from when it was just png.

Change this:
  pdb.file_png_save_defaults(tempimage, tempdrawable, tempfilename, tempfilename)


To this:
  pdb.gimp_file_save(tempimage, tempdrawable, tempfilename, tempfilename)


I've updated the attachment two pages back.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Feb 07, 2012 1:33 pm  (#192) 
Offline
GimpChat Member

Joined: Jan 13, 2011
Posts: 659
Location: Poland
I thought the choice of changing procedures - perhaps unnecessarily.
Now it works OK.
Thank you very much - You are wonderful!

Ps.
"Local Settings" has properties - hidden (unavailable for some programs).
How to in Shellout set the location ( select - important to override the file ) of the file (ShellOutTempFile) in another directory ? Can I change the code to write ShellOutTempFile in a specific directory?
Optimally selected in Preferences-> Folders-> Temporary Folder.


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Feb 07, 2012 3:58 pm  (#193) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 596
I just call pdb.gimp_temp_name which provides an appropriate temporary file and directory. If you want to specify it uncomment out the first line and comment out the second one in this bit of code:

  # Use temp file names from gimp, it reflects the user's choices in gimp.rc
  # change as indicated if you always want to use the same temp file name
  # tempfilename = pdb.gimp_temp_name(progtorun[2])
  tempfilename = os.path.join(tempfile.gettempdir(), "ShellOutTempFile."+progtorun[2])


-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 3:02 pm  (#194) 
Offline
GimpChat Member

Joined: Jan 13, 2011
Posts: 659
Location: Poland
Reading
http://docs.gimp.org/2.6/en/gimp-fire-up.html#gimp-concepts-running-language
Another GIMP instance
Use -n to run multiple instances GIMP. For example, use gimp-2.6 to start GIMP in the default system language, and LANGUAGE=en gimp-2.6 -n to start another instance of GIMP in English; this is very useful for translators.

ShellOut (0.7) is also a way to simultaneously run multiple versions of the GIMP (XP 32bit)- the transfer of image and language selection (to 2.6 - in the 2.7 range in the preferences).

Edit the path and choose the LANGUAGE:
for example :multigimp-2.6.bat
@echo off
echo *** Do Not Close this Window ***
echo Temp File: %1
set LANGUAGE=en
"C:\Program Files\GIMP-2.0\bin\gimp-2.6.exe" -n %1


for example multigimp-2.7.bat
@echo off
echo *** Do Not Close this Window ***
echo Temp File: %1
set LANGUAGE=pl
"C:\Program Files\GIMP 2.7\bin\gimp-2.7.exe" -n %1


ShellOut programlist = [
  ["GIMP 2.6", "\"C:\\Bat\\multigimp-2.6.bat\"", "png"],
  ["GIMP 2.7", "\"C:\\Bat\\multigimp-2.7.bat\"", "png"],


Attachments:
multigimp.png
multigimp.png [ 608.03 KiB | Viewed 631 times ]
Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 3:07 pm  (#195) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6112
That is cool; can now run GIMP 2.8 64-bit but still have access to all the cool GIMP 2.6 plugins too. Thanks MareroQ. I doubt Mathmap, for instance, will ever get ported to 64-bit GIMP. It will slow things down a bit to do things though; may even continue to run 2.6.12 32-bit because of that because of 64-bit lack of support (mini wishlist to include PSPI, Mathmap, and Filter Factory (user filter) Convertor). Not sure I would even really use he new features in 2.8, but then again.... lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 9:12 pm  (#196) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11226
Location: "Looking for my eraser" =P
Thanks Marero, now i can load Gimp-2.6 and use the python word art plugin through Gimp-2.7. :)

_________________
Image
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 9:22 pm  (#197) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6112
Never thought about going the other way Rod; isn't Shellout grand? I say yes. Shellout is a game changer no doubt. Indeed, I might actually have GIMP 2.6.12 call out GIMP 2.8x for the few features that I may need in the new GIMP since I know the GIMP plugins that I can not live without won't get ported to GIMP 2.8 64-bit immediately (and maybe never). :)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Thu Mar 29, 2012 9:49 pm  (#198) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 11226
Location: "Looking for my eraser" =P
lylejk wrote:
Never thought about going the other way Rod; isn't Shellout grand? I say yes. Shellout is a game changer no doubt. Indeed, I might actually have GIMP 2.6.12 call out GIMP 2.8x for the few features that I may need in the new GIMP since I know the GIMP plugins that I can not live without won't get ported to GIMP 2.8 64-bit immediately (and maybe never). :)


Shellout is an awesome addition to the program, and i recommend it to all those who use Python-Fu.
It definitely changed the way i use Gimp, and some Adobe plug-ins that PSPI seems to have a hard time with. :)
Thanks again Rob, and MareroQ!

_________________
Image
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Fri Mar 30, 2012 12:06 pm  (#199) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 6112
I tried to run shellout for GIMP 1.2.4 but keep getting a libgtk0.dll can't be found or something like that. I even tried to include the path for this library to no avail. Not too important but wish that it could be done. Oh well. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Profile  
 
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Fri Mar 30, 2012 11:41 pm  (#200) 
Offline
GimpChat Member

Joined: Jan 13, 2011
Posts: 659
Location: Poland
Just out of curiosity
http://www.gimpchat.com/viewtopic.php?f=15&t=3965


Attachments:
Old-Gimp.png
Old-Gimp.png [ 303.95 KiB | Viewed 557 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 274 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23 ... 28  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot], he4rty and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group