It is currently Thu Mar 28, 2024 4:58 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 295 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 15  Next
Author Message
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Feb 07, 2012 11:50 am  (#191) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
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
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Feb 07, 2012 12:33 pm  (#192) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2231
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.

_________________
Image

Slava
Ukraini!


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

Joined: Jul 14, 2010
Posts: 697
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
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 2:02 pm  (#194) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2231
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 2666 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 2:07 pm  (#195) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
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
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Wed Mar 28, 2012 8:12 pm  (#196) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Thanks Marero, now i can load Gimp-2.6 and use the python word art plugin through Gimp-2.7. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


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

Joined: Sep 24, 2010
Posts: 12513
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
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Thu Mar 29, 2012 8:49 pm  (#198) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
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
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


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

Joined: Sep 24, 2010
Posts: 12513
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
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Fri Mar 30, 2012 10:41 pm  (#200) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2231
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 2592 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Fri Mar 30, 2012 11:12 pm  (#201) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
I can launch 1.2.4 from Windows, but not form DOS prompt or Python MareroQ. That's what's weird. When I try to launct 1.2.4 form DOS or the Shellout, I get the error as I stated before. Not sure why; again, I even tried to add the path to the library in question but to no avail. I can, however, copy paste though or save file and open it within 1.2.4 (if I need to preserve the alpha channel since copy paste apparently does not). Of course GIMP 1.2.4 copy/paste is a little different then what we all know GIMP 2x is for those old timers who know what I am talking about. You have to copy to clipboard or paste from clipboard in 1.2.4. GIMP copy/paste used an eternal format for only GIMP otherwise. Dilate/Erosian, as I recall, was backwards from what it is now too. lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Apr 10, 2012 12:58 am  (#202) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
Just wanted to say thanks MareroQ. Can't get LqR or Filter Factory Convertor to work in 2.8 64-bit, so at least I do have a workaround for now. Graechen figured out how to get Mathmap to work in 64-bit 2.8 so at least I am happy with that. :)


Attachments:
2gimps.png
2gimps.png [ 361.32 KiB | Viewed 4791 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Tue Apr 10, 2012 11:09 am  (#203) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2231
Location: Poland
It is only thanks to RobA - great tool - it can in GIMP version 3.0 will be unnecessary - but at the moment is still very valid plugin!

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 3:10 am  (#204) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2231
Location: Poland
http://www.gimpchat.com/viewtopic.php?f=7&t=4202#p51647
"Since I do like mm's sigmoidal contrast plugin, I'm happy that at least I don't have to use the hack anymore to get this plugin to work, but mm's labcurves plugin still bugs out, so I added a comment at Mickey's thread at the registry and hope he will find a work-a-round to it since labcurves is a cool plugin in (both need TIF; wish Mickey would have used PNG. lol)...."

It is after all the solution (important - ShellOut in version 0.7):
  ["LabCurves", "\"C:\\Tools\\LabCurves\\LabCurves.exe\"", "png"],

  ["EAWTool", "\"C:\\Tools\\EAWTool\\EAWTool.exe\"", "png"],

also for Photivo:
  ["Photivo", "\"C:\\Program Files\\Photivo\\photivo.exe\"", "png"],


Ps. LabCurves requires a complete library Python tcl


Attachments:
LabCurves.png
LabCurves.png [ 366.94 KiB | Viewed 4747 times ]
Photivo.png
Photivo.png [ 324.41 KiB | Viewed 4747 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 7:30 am  (#205) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Thanks MareroQ! :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 8:19 am  (#206) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
I still get the identical error when I use shellout in GIMP 2.8 as I do mm's labcurves python Script MareoQ. Not sure of the solution to this one; suspect the version of python that GIMP 2.8 uses is somehow not compatible or interferes with Labcurves or using 64-bit GIMP is the culprit. Don't use it that often and, like many thing's in GIMP, there's more then one way to skin a cat, so I may indeed have to live with this one. :)


Attachments:
lc_error.png
lc_error.png [ 28.25 KiB | Viewed 4731 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 8:32 am  (#207) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
What the hey; now that 2.8 is official, the new side by side. lol

:)


Attachments:
sidebyside.png
sidebyside.png [ 99.95 KiB | Viewed 4728 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 8:46 am  (#208) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
4 years between stable releases. :lol
Hope we don't have to go through that again! :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 8:50 am  (#209) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
lylejk wrote:
I still get the identical error when I use shellout in GIMP 2.8 as I do mm's labcurves python Script MareoQ. Not sure of the solution to this one; suspect the version of python that GIMP 2.8 uses is somehow not compatible or interferes with Labcurves or using 64-bit GIMP is the culprit. Don't use it that often and, like many thing's in GIMP, there's more then one way to skin a cat, so I may indeed have to live with this one. :)


Works for me through Shellout and Gimp-2.8
I have them all installed in the C:\Tools\ directory so i don't have to change the script. (line 66)
Did you install in different directory than Tools Lyle?

Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: ShellOut.py (was XNViewShell) - Call external programs
PostPosted: Sun May 06, 2012 9:05 am  (#210) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12513
No; identical per MareroQ's entry. It still works in 2.6.12 too. Has to now be a 64-bit GIMP issue then since I believe you are still using 32-bit GIMP (and my 2.6.12 is indeed still 32-bit). No other explanation makes sense. I did post this issue at the Registry, but I have now idea what the work-a-round will be. :)

_________________
Lyle

Psalm 109:8

Image


Top
Post new topic Reply to topic  [ 295 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12, 13 ... 15  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Extended version ShellOut.

1

No new posts Attachment(s) How to call a python filter to run interactively

10



* Login  



Powered by phpBB3 © phpBB Group