G'MIC for OpenFX and Adobe plugins

It seems there is a problem if the G’MIC resource path does not yet exist on the system. This is by default "c:\Users[username]\AppData\Roaming\gmic\gmic"
I’ll fix this for the next update.

Please try this release, it will automatically create the G’MIC resource folder if it does not exist:
http://reduxfx.com/20230309_gmic_321_adobe_ofx_test.zip

Thanks Tobias but unfortunately it’s still not working, I amended the Natron config, already had a G’MIC resource path anyway so not sure what it could be.
Will try again later today!

If an OFX plugin depends on DLL’s it must be included in the same folder as the .ofx file and a manifest must be applied to the binary.

Or the DLL needs to be in any of the system path folders

sure, but that’s not portable or preferred IMHO :slight_smile:

SxS is horribly error-prone on Windows in my opinion. :slight_smile:

In any case, here it is a bit different since the DLL in question can be generated by different compilers and developers AND it should be in a central place as it can be used by several different applications, OFX plugins being only one of them.

still getting errors no matter what I do, oh well maybe it’s just my PC…

Natron Version 2.5
(C) 2018-2022 The Natron developers
(C) 2013-2018 INRIA and Alexandre Gauthier-Foichat
>>>Use the --help or -h option to print usage.<<<
couldn't open library C:\Program Files\Common Files\OFX\Plugins\gmic_ofx.ofx.bundle\Contents\win64\gmic_ofx.ofx because The specified module could not be found.
 was returned
couldn't open library C:/Program Files/Common Files/OFX/Plugins\gmic_ofx.ofx.bundle\Contents\win64\gmic_ofx.ofx because The specified module could not be found.
 was returned
Info: init.py script not loaded (this is not an error)
Info: initGui.py script not loaded (this is not an error)

Do you have the Visual Studio 2012 runtime libraries installed? They should come with every newer Windows version though.

1 Like

You can also try to download the “Dependencies” tool (GitHub - lucasg/Dependencies: A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.) and then drag n’ drop the “c:\Program Files\Common Files\OFX\Plugins\gmic_ofx.ofx.bundle\Contents\Win64\gmic_ofx.ofx” file into the app to see if it finds any inconsistencies on your system.

I think that’s it! The 2012 Visual c++ thing (I had about 5 other versions, but not that particular one for some resaon)
On thing is though, not sure if this is expected, but the catagories and sub-catagories of different filter groups seem to be merged together. Anyway apart from that all seems good, have renfered a few tests, a-ok, thanks a lot for the OFX filters and the help here - much obliged !! :slight_smile:

My new G’MIC OFX plugins are to be found under the “GMIC OFX” category in Natron (with subcategories). But Natron itself comes with its own set of GMIC plugins, based on an older version of my plugin, which is in the “GMIC” category in Natron (without subcategories).
Therefore be sure you use/test the plugins in the “GMIC OFX” category.

Tobias, nice job! Have you made your Visual Studio project publicly available? I am struggling linking a VS2017 Windows application to gmic using dlls.

Andrea

Which VS project do you mean? In my repo are the solutions for creating the AE and OFX plugins, are you talking about the general libcgmic.dll / libcgmicstatic.dll?

@Tobias_Fleischer , I think @Andrea is trying to compile a C++ code with Visual, that would use the C++ libgmic library (generated from g++/MingGW).
Do you think this is possible or is it mandatory to use the C API instead (libcgmic).

MinGW and the Microsoft compiler are not binary/ABI compatible concerning C++ objects, so @Andrea would need to recompile the GMIC C++ library in VS as part of his project.
My libcgmic API is actually doing the same internally for this very reason, it compiles the GMIC C++ interpreter into a separate DLL that can be accessed without any external dependencies or specific compilers, so it is less of a pure C API than a way of accessing the GMIC functionality from any C or C++ compiler.

1 Like

I try to link a c++ application with Visual Studio, but I don’t mind using the C API - that’s not an issue at all.

You can compile gmic.cpp in your project but the dependencies to third-party libraries are horrible to resolve. The C API is simply a wrapper around that with no dependencies.

Thank you Tobias. Sounds like what I try to achieve is nothing for the faint of heart, and has not yet been done before. I’ll report!

Well, it largely depends on what third-party features and libraries you require. Compiling GMIC with TIFF and OpenCV support for example will make things more complicated
But “never been done before” is not true, I compile all my GMIC stuff on Windows using Visual Studio.