It is currently Wed Aug 05, 2026 1:05 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Mon May 05, 2025 8:07 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
For some reason unknown to me (since I don't know Python3 or the Gimp3 API :oops: ), a respected forum user asked me for an example of a py plugin using G'MIC.

It's nothing interesting except for a simple example.

In menu: Test ➤ Average py

Image

Edited to include a screenshot from G'MIC

Image


Attachments:
Gmic_average.zip [2.12 KiB]
Downloaded 2609 times

_________________
Image


Last edited by MareroQ on Mon May 05, 2025 11:26 am, edited 1 time in total.
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Mon May 05, 2025 8:30 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2610
That is a good example, thank you very much. Works fine with my linux Gimp 3.0.2 appimage.

At the same time I find it very depressing that Gimp python 3 is so verbose and (for me) complicated.


Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Mon May 05, 2025 8:54 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
Hi Rich.

My opinion is the same. :gaah
And it was supposed to be easier and faster, which I've read many times (it may be so for professional programmers).
I wrote plugins for Gimp2 for my own pleasure, and for Gimp3 I just check if I can still think logically. :mrgreen:

_________________
Image


Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Tue May 06, 2025 3:12 am  (#4) 
Offline
New Member

Joined: May 06, 2025
Posts: 1
Thanks for sharing this! Even if it’s a simple example, it’s still really helpful for those of us trying to understand how G’MIC can be used inside a py plugin. Sometimes small, clear examples are the best way to get started. Appreciate the effort!

_________________
Hi there! I'm Zu. It's a pleasure to meet you. I'm excited to connect and get to know each other better. Let's have a great conversation and share wonderful experiences together!


Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Tue May 06, 2025 12:54 pm  (#5) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 306
Also this topic on gnome's discourse might help:
https://discourse.gnome.org/t/porting-a ... imp3/28081


Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Wed May 07, 2025 3:13 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
Thank You very much for the link provided.
I consider the Nelo widget_variants.py plugin to be the most useful help.

Image

_________________
Image


Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Fri May 16, 2025 10:15 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
A bit more extensive usage example: G'MIC and GEGL
- using GEGL based on Choice-demo.py by Ofnuts,
- new widgets based on widget_variants.py by Nelo.

In menu: Test ➤ GMIC Stringify and GEGL Emboss

GMIC Stringify:
Image

GEGL Emboss:
Image

Gmic_stringify_and_Gegl_Emboss.py:
Image

Background Color is HTML Notation:
Image

Example 1:
Image

Example 2:
Image


Attachments:
Gmic_stringify_and_Gegl_Emboss.zip [3.56 KiB]
Downloaded 610 times

_________________
Image
Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Sun May 18, 2025 5:08 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
Ver.0.1 Gmic_stringify_and_Gegl_Emboss:
- GEGL based on foggify.py by James Henstridge,
- tested radio_frame and a comment inside the dialog box.

Image

Image

Image


Attachments:
Gmic_stringify_and_Gegl_Emboss Ver.0.1.zip [3.56 KiB]
Downloaded 3243 times

_________________
Image
Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Fri May 23, 2025 10:48 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2648
Location: Poland
I have slightly updated widget_variantions.py by Nelo.
However, there are still no equivalents from Gimp2: PF_VECTORS, PF_TEXT.

In menu: Test ➤ Show Widget Options

Image

This code fragment is responsible for displaying widgets:
Image

You will only need some of them for your plugin, so you can disable unnecessary ones
# -> comment on widgets you won't use
Image

Image


Attachments:
Show_Widget_Options.zip [3.57 KiB]
Downloaded 588 times

_________________
Image
Top
 Post subject: Re: Example of using the G'MIC filter in the py plugin for Gimp3.
PostPosted: Fri May 23, 2025 2:50 pm  (#10) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 306
:tyspin


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group