GIMP Chat http://gimpchat.com/ |
|
Access built-in Kaleidoscope with Python http://gimpchat.com/viewtopic.php?f=9&t=19823 |
Page 1 of 1 |
Author: | gimpquestion [ Sat Feb 12, 2022 9:30 am ] |
Post subject: | Access built-in Kaleidoscope with Python |
Hi, I'm trying to write a python script, that performs a number of steps. Most of them I can already perform, but one of the most important ones I can not access (meaning the kaleidoscope function). I want to use the Built in Kaleidoscope function from GIMP (which in the GUI I can access via filter -> disturbe -> kaleidoscope) and would like this function in the script as well. Is there any way (such as pdb.plug_in_mosaic(variables, variables) for the Gimp native kaleidoscope? Any help is much appreciated. Using Windows 11 & GImp 2.10 Many thanks in advance |
Author: | Pocholo [ Sat Feb 12, 2022 4:57 pm ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
Ever since the arrival of GIMP 2.10, a lot of GIMP 2.8 filter/plugins were omitted. GIMP 2.10 works with Gegl plugins and there is not a PPB for gegl plugins. You can use G'MIC to call the 4 different style of Kaleidoscopes. Code: Select all pdb.plug_in_gmic_qt(image, layerName, 1, 0, "command") |
Author: | MareroQ [ Sat Feb 12, 2022 8:57 pm ] | ||
Post subject: | Re: Access built-in Kaleidoscope with Python | ||
Hi Gimpquestion. Since You started writing the python plugin, you can probably do it by using the sample code https://www.gimpscripts.net/2021/11/pattern-editor.html Good luck coding.
|
Author: | gimpquestion [ Sun Feb 13, 2022 7:05 am ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
Thanks for the answers already. @MareroQ - this seems as it requires interaction with a GUI. I want to automatically apply the same filter (with same specifications) to a large number of images in a for loop. @Pocholo THis seems promissing, but I don't have the G'MIC plug in? Where can I get this? To clarify for myself: Does this enable me to interact with the Built in GEGL Kaleidoscope, which i find in "Filter -> Distortion", or rather with the fractal explorer? Many thanks in advance! |
Author: | Pocholo [ Sun Feb 13, 2022 7:48 am ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
For the G'MIC plugin download go to https://gmic.eu/ Click on the download tab and choose download. Choose the ".exe" Windows platform. Install it, and restart GIMP. You'll find it in the menu "Filter" down at the bottom. Once you open G'MIC, Click on: Deformation> and there are three kind. There is no Pocedure for the "Gegl" internal plugins. Like MareroQ stated, you can extract the function from the plugin he created mention on prior post. |
Author: | gimpquestion [ Mon Feb 14, 2022 7:18 am ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
Thanks! If I call the command as outlined, nothing happens (instead of command I entered "Kaleidoscope [Polar]" but I get a run time error message. Probably, because i have to transfer the parameters, that apply to it? Can you give me a pointer as to how that is done/ where I can find the documentation for that. I went a little bit through the documentation of G'MIC, but didnt find pointers on how that is actually accomplished in the Python-Skript. Thanks again! |
Author: | nelo [ Mon Feb 14, 2022 9:56 am ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
From one of Pocholo's plugins: for example: Code: Select all pdb.plug_in_gmic_qt(img,refLayer,1,0,"fx_spherize 31,2.5,0,64,34,0,9,0,0") img - the image you work on refLayer - the layer 1,0 - in and output options of GMIC and the action string. |
Author: | gimpquestion [ Fri Feb 18, 2022 3:43 am ] |
Post subject: | Re: Access built-in Kaleidoscope with Python |
Thanks that helped ![]() Maybe a followup on GIF Animation via scripting. I tried a very simple setup with the python script: png file is loaded as image pdb.script_fu_waves_anim(image, image.active_layer, 30, 35, 10, 0) image = pdb.plug_in_animationoptimize(image, image.active_layer) pdb.gimp_image_convert_indexed(image, 0, 0, 255, 0, 1, '') pdb.file_gif_save(image, image.active_layer, '1.gif', '1.gif', 0, 1, 10, 1) while str write is declared as a string specific string Is there an apparent reason, why the .gif file is returning empty/ with 0 bytes? |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |