Successfully updated digiKam G’MIC plugin to G’MIC 4.0.3 (lots of help from ChatGPT as I’m not really a coder)
Hi all,
I recently noticed that the current digikam-gmic-qt plugin from the github repository of @hdynamo still ships with libgmic 3.6.0, while the current G’MIC release is 4.0.3.
Purely as an experiment, I followed the update procedure described in UPDATE.md and managed to successfully update the plugin to G’MIC 4.0.3.
Test environment
- Manjaro Linux
- digiKam 9.1
- Qt 6
- Clang 22
- G’MIC 4.0.3
- CImg 4.0.3
Result
The plugin compiles successfully, installs correctly and is loaded by digiKam.
The About dialog now reports:
Libcimg version: 403
Libgmic version: 403
More importantly, the online filter definitions can be updated successfully again (this failed with the old bundled 3.6.0 version), and I have tested a number of filters successfully.
Things I encountered
The update procedure in UPDATE.md is still largely correct, but I ran into a few issues:
- the top-level
gmicrepository also has to be present during the update; CImg.hmust come from the same release as G’MIC (otherwise the build automatically downloads the latest CImg, resulting in a version mismatch such as 403 vs 404);- Patch 07 appears to be already included in Patch 01;
- one source change was required because
gmic::init_rc()now returnsvoidinstead ofbool.
QFileInfo pathInfo(qpath);
if (!pathInfo.isDir() && create) {
gmic::init_rc();
pathInfo.refresh();
}
if (pathInfo.isDir()) {
result = qpath;
} else {
result.clear();
}
Apart from that API change, I did not need to make any functional changes to the plugin itself.
I also documented the complete update process from a clean checkout. If useful, I can post a step-by-step guide.