Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 4,781
» Latest member: Cope57
» Forum threads: 7,594
» Forum posts: 41,394
Full Statistics
|
Latest Threads |
Is there any version wher...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: HavingTooMuchFun
10 hours ago
» Replies: 0
» Views: 112
|
How to make a watermark o...
Forum: General questions
Last Post: kyolim
09-13-2025, 10:05 PM
» Replies: 5
» Views: 14,082
|
Linux command that does e...
Forum: Other graphics software
Last Post: rich2005
09-13-2025, 06:06 PM
» Replies: 1
» Views: 404
|
reliable Gimp 2.10.38 dow...
Forum: Older Gimp versions (2.8, 2.6....)
Last Post: denzjos
09-13-2025, 05:20 PM
» Replies: 2
» Views: 335
|
Batch Color Saturation
Forum: Extending the GIMP
Last Post: rich2005
09-13-2025, 07:53 AM
» Replies: 15
» Views: 11,977
|
Photo play-time
Forum: Gallery
Last Post: Ofnuts
09-13-2025, 07:32 AM
» Replies: 24
» Views: 21,818
|
BIMP plugin for GIMP 3.10
Forum: Extending the GIMP
Last Post: firefly
09-12-2025, 11:53 PM
» Replies: 2
» Views: 682
|
pl_stroke_arrows GIMP 3.0...
Forum: Extending the GIMP
Last Post: Scallact
09-12-2025, 04:03 PM
» Replies: 0
» Views: 337
|
How do you make text circ...
Forum: General questions
Last Post: rich2005
09-12-2025, 07:18 AM
» Replies: 12
» Views: 3,432
|
New Install, Black Screen...
Forum: OSX
Last Post: akhrameev
09-11-2025, 02:32 PM
» Replies: 3
» Views: 3,089
|
|
|
Gimp Python-fu 2.7 to launch Python 3 for editing images |
Posted by: audovoice - 11-12-2018, 09:03 AM - Forum: Extending the GIMP
- Replies (7)
|
 |
On windows 10 you can open up python-fu console in gimp and launch a python 3 terminal.
Code:
from subprocess import call
call(["C:/Users/audov/AppData/Local/Programs/Python/Python36/python.exe"])
If you have python 3.6 that will launch it and when you close that console it gets an exit code back. If you close python 3 by typing exit() the exit code is 0. If you just close the terminal you get -1073741510.
But if I try to pass in additional arguments about what python file to run then I get problems. For example if I run this.
Code:
from subprocess import call
call(["C:/Users/audov/AppData/Local/Programs/Python/Python36/python.exe", "D:/Projects/neural-style-master/neural_style.py"])
I get an exit code of 1 and the terminal opens but immediately closes.
If I were to run the same thing by running python 2.7 and then run this.
Code:
from subprocess import call
call(["C:/Users/audov/AppData/Local/Programs/Python/Python36/python.exe", "D:/Projects/neural-style-master/neural_style.py"])
Then from python 2.7 it launches the specified script using python 3.6. By then typing exit() I end up back in python 2.7.
----------------------------------------------------------------
But Why
----------------------------------------------------------------
The reason I want to do all this is so that I can write a plugin that sends a specified image or set of images to a command line program written for python 3.6. I would then either directly pass back the modified images or save them to a temp file, and then pass back the path.
The reason I need it to be python 3 is because of the use of Tensorflow and similar deep learning image processing libraries. Tensorflow both has useful projects written for it and approaches being easy to install on Windows, Mac, and Linux but it needs python 3.6.
The reason Tensorflow would be useful is there are projects like these Github projects.
https://github.com/anishathalye/neural-style
takes about 5 minutes to process an image with a gpu.
https://github.com/Eyyub/tensorflow-pix2pix
takes about 20 seconds to initialize and then about 2 seconds to process each image.
https://github.com/lengstrom/fast-style-transfer
takes 2 seconds to under a second to process an image.
All of which can make a wide range of innovative changes to images.
Integrating them into a program like gimp would greatly aid their integration into a broader creative process. As it stands now using something like neural-style requires a command line argument like...
D:/Projects/neural-style-master/neural_style.py --network D:/Projects/neural-style-master/imagenet-vgg-verydeep-19.mat --checkpoint-output "D:/Projects/neural-style-master/temp/temp.png" --iterations 600 --style-scales 1.0 --content-weight-blend 1.0 --content-weight 5.0 --style-weight 500.0 --tv-weight 100.0 --pooling avg --width 512 --content "D:/tile/nature256/nature_00312.png" --styles "D:/tile/nature256/nature_01111.png" --output "D:/tile/temp/nature_00312.png_nature_01111.png.png"
There are efforts to integrate projects like these into a gui but it would be far preferable to make it into a plugin for something like gimp.
---------------------------------------
If what I am trying to do is not possible I am open to trying to do it another way.
The most extreme solution I can think of would be adding a python 3 version of python-fu.
I read somewhere that it was very important to keep python-fu as 2.7 because of plugin comparability. That seems very reasonable.
The same poster however said that there was nothing to stop adding python-fu 3 as a separate plugin. According to them the only reason it was not done already was because there was no great interest from the community to work on adding that feature.
|
|
|
MS Paint replacement? |
Posted by: PaulNaude01 - 11-10-2018, 09:39 AM - Forum: General questions
- Replies (2)
|
 |
I am a long time Gimp user (can't remember how long - I was even a few versions behind I found out ) and use it almost daily too, but what I also use even more often, to quickly annotate a screen grab when supporting customers with a "click 'this' button" image, I open MS Paint. The reason? It opens in a flash (probably because it have almost no functionality) and I can quickly add an arrow or encircle a button.
For serious stuff, I obviously open GIMP and don't care to wait for it to open, but for these stupid little things, GIMP simply takes too long to open and I can't quickly draw a circle, rectangle or arrow pointer. Granted, I could do this in Outlook or Word too, but then you are almost guaranteed that the arrow or circle will end up somewhere else. So I simply screen grab, open MS Paint (it opens faster than I can type this), add my arrow or whatever, copy and paste into my email and send.
BUT, Microsoft has revealed that they will stop providing MS Paint some time soon with a next version of Windows or something, and left me wondering if this would not be the ideal opportunity for the GIMP community to produce a GIMP light, that opens in a flash, with the bare minimum tools (but with added annotation options like arrows, lines, circles etc. and basic colour, thickness etc. options like MS Paint), and then, should you need more, you simply click a button to open the full power of GIMP.
This may be a nice way to grow the community and get even more people familiar with GIMP and drawn into the deep side.
The best response would obviously be for someone to tell me there is such a version that I just did not know about!
Regards
|
|
|
Resynthesizer ??? |
Posted by: BuckSkin - 11-10-2018, 07:05 AM - Forum: Extending the GIMP
- Replies (4)
|
 |
My first post here.
Windows 7 (it is not a choice in the registration - Vista is as late as it gets)
GIMP 2.10.6 (I didn't see that as a choice either)
I have just successfully (I think) installed my first plug-in = Resynthesizer
Contained in the Zip-file, but not inside the Win64 folder were eight more .py plug-ins:
1. Heal_Selection
2. Heal_Transparency
3. Map_Style
4. Render_Texture
5. Resynth_Enlarge
6. Resynth_Fill_Pattern
7. Resynth_Sharpen
8. Uncrop
When I go to Filters > Map > , Resynthesize is there and a little window with two tabs, "Options" and "Tweaks" will open when I click on Resynthesize.
There is a bit of confusion in that everywhere I read about the plug-in, and even the file names in the download, all refer to it as "Resynthesizer"; however, in the Filters > Map > menu, and on the dialogue window, it is simply Resynthesize = no "r"; is that how it should be ?
I sort of thought that these other eight plug-ins should also show in the filter menu, but I sure cannot find them.
I put everything in C > Users > Username > AppData > Roaming > GIMP > 2.10 > Plug-ins --- is that the right place ?
I have lots more questions once I have the answers to these two.
Thanks for reading and all help is appreciated.
|
|
|
Unable to get GIMP to recognize plug-ins |
Posted by: PurpleArachnid - 11-10-2018, 01:50 AM - Forum: Extending the GIMP
- Replies (3)
|
 |
i'm running gimp 2.10.6 on windows 10. I'm new to the whole concept plug-ins but am trying to use the python plug-in for the "heal selection" tool. I have followed the instructions, and videos on how to install everything, but am still not getting GIMP to find the files. This is the error message i'm getting:
Traceback (most recent call last):
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python/gimpfu.py", line 740, in response
dialog.res = run_script(params)
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python/gimpfu.py", line 361, in run_script
return apply(function, params)
File "C:\Users\Chris\AppData\Roaming\GIMP\2.10\plug-ins\plugin-heal-selection.py", line 148, in heal_selection
pdb.plug_in_resynthesizer(timg, tdrawable, 0,0, useBorder, work_drawable.ID, -1, -1, 0.0, 0.117, 16, 500)
error: procedure not found
Any ideas of what i'm doing wrong? or suggestions on how to fix this?
thanks everyone!
|
|
|
|