G'Mic GEGL release 0.1.0

Hi,

I’ve published the first public release (v0.1.0) of GMIC-GEGL, an experimental plugin that exposes G’MIC commands as native GEGL operations.

What’s in this release

  • 1500+ GEGL operations generated from G’MIC commands
  • Works as a GEGL plugin, not a standalone app
  • Experimental status - some operations may not work or may behave incorrectly
  • G’MIC is executed on full image buffers (not tiled), so performance may vary

The goal of the project is to make G’MIC filters available directly inside the GEGL graph, without a separate Qt UI, and usable by any GEGL-based application.

Flatpak runtime and GEGL plugin installers

This release provides four artifacts, split into runtime and plugin components:

G’MIC Flatpak runtimes

Required to run G’MIC inside the Flatpak sandbox:

  • GIMP G’MIC runtime (.flatpak)
  • RasterFlow G’MIC runtime (.flatpak)

GEGL plugin installers

GEGL plugin extensions distributed as .run installers:

  • Gimp3-GMIC-GEGL-0.1.0.run
  • RasterFlow-GMIC-GEGL-0.1.0.run

GitHub release: Release G’MIC Runtime v3.6.5 and G'Mic GEGL plugins v0.1.0 · flatscrew/gmic-gegl-plugin · GitHub

Windows build will come soon, and MacOS, eventually…

Cheers!
activey

3 Likes

cc @David_Tschumperle :slight_smile:

2 Likes

One of nice features of this approach is that when you apply a GEGL filter you can then go back end edit it’s properties so it’s fully non-destructive :slight_smile:

4 Likes

Awesome work, thank you @activey !
I’m away for vacations right now, but I’ll test all this when I’m back. Kudos to you for your perseverance ! :star_struck:

1 Like
  1. where is -lcgmic coming from?
  2. you are linking libraries which you arent declaring as dependency. (-lX11)

build log can be found here:

Ahh, yes, I need to clean this up, thanks for reporting it… I will have a look at it tomorrow and try to untangle it and document a bit better :slight_smile:

lcgmic is an internal library no?

Its from gmic, you get it when you build gmic with this:

make libc

You can see it here in flatpak manifest:

@David_Tschumperle

Index: gmic-3.6.5/src/Makefile
===================================================================
--- gmic-3.6.5.orig/src/Makefile
+++ gmic-3.6.5/src/Makefile
@@ -502,7 +502,7 @@ displayless:

 # CLI (shared)
 #--------------
-cli_shared:
+cli_shared: lib
        $(MAKE) "CFLAGS+=$(GMIC_STD_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_STD_LIBS) $(OPT_LIBS) -lgmic" _lib _cli
        $(STRIP) gmic$(EXE)

@@ -546,7 +546,7 @@ libcgmic_files:
        fi
        @echo " done!"

-libcgmic.so: libcgmic.o
+libcgmic.so: libcgmic.o libgmic.o
        ar rcs libcgmic.a libcgmic.o
 ifeq ($(OS),Darwin)
        $(CXX) -dynamiclib -o libcgmic.$(SOVERSION).dylib -install_name $(USR)/lib/libcgmic.$(SOVERSION).dylib -compatibility_version $(SOVERSION) -current_version $(SVERSION) $(MANDATORY_CFLAGS) libcgmic.o libgmic.o $(LIBS)
@@ -569,8 +569,8 @@ endif
 libcgmic.o: gmic_libc.cpp CImg.h gmic_libc.h gmic.h
        $(CXX) -o libcgmic.o -c gmic_libc.cpp -Dgmic_core $(PIC) $(CFLAGS)

-use_libcgmic: use_libcgmic.c gmic_libc.h
-       $(CC) -std=c99 -o use_libcgmic use_libcgmic.c -lcgmic $(LIBS)
+use_libcgmic: use_libcgmic.c gmic_libc.h libcgmic.so
+       $(CC) -std=c99 -o use_libcgmic use_libcgmic.c -L. -lcgmic $(LIBS)

 # libcgmic (static)
 #-------------------

without this patch it tries to build use_libcgmic before the library is build when you build -j > 1. While i was at it i fixed some more dependencies.

Thanks @darix !

@David_Tschumperle I have a question. instead of duplicating the libgmic.o file into libcgmic.so? … why dont we link libgmic.so into libcgmic.so … so that it would be just a thin C wrapper library?

Hi @darix

I’ve just updated code by removing unnecessary link args and updated readme in repo to reflect all required dependencies: GitHub - flatscrew/gmic-gegl-plugin: GEGL code for calling G'MIC. EXPERIMENTAL!

Thanks again for noticing it :slight_smile:

i have a question … you are using the C++ library to read the stdlib but the C wrapper library for everything else. ( according to the readme )

what is the reason for that split?

Hehe, right, I use c++ lib also to get current G’Mic stdlib version by reading gmic_version from gmic.h

This from the top of the header:

#ifndef gmic_version
#define gmic_version 365

Hi @darix ,

Just did an update and now I only use libcgmic :slight_smile:

btw, merry xmass hehe

1 Like

I quickly did a build against git version of the package and it works just fine with that too.

2 Likes