Compiling versus Pre-compiled

Hi! I’m sure this is a bit of a pain in the but question, but I want to come to a definite conclusion!

For context:

  • I use Windows 11.
  • I currently use the gmic CLI via the pre-compiled windows download and also use the G’MIC-qt plugin for both gimp and Krita.
  • Sometimes I use the cli alone for image processing but do also love turning ideas into Krita G’MIC-qt filters. Thus far I haven’t had many problems with this.
  • I do have some coding background but certainly not an extensive amount.

Honestly I’ve been able to achieve what I want to for the most part. There are just some things that I get a little bit stuck on, and one of the biggest things that I’ve been trying to get to the bottom of is the difference between compiling gmic myself, and using the precompiled version. I’ve tried to look through this page and the other gmic sites for clarification but I haven’t been able to find exactly what I need. Regardless, if a post like this already exists, or there’s a page that has this info, I would love if you would be able to point me in that direction! I have tried to look through as much as I can but I feel like I start getting mixed information and I figured why not just bite the bullet and as the darn question haha. I have a few friends wondering the same things so I’m hoping this could be helpful to others in my shoes haha.

Let me start by specifying my question a bit better because I realize the question itself is terribly vague. I understand that there are two main ways to go about downloading and using gmic- 1) you can download the precompiled windows zip archive:


2) or you can compile it yourself

My main question is what limitations I have by choosing not to compile myself. Additionally, because I use gmic CLI and the plugin for Krita and gimp, I want to know if not compiling this can cause me any issues in the future. I do not want to find out that my lack of issues thus far can be attributed to luck…

I want to get this cleared is because I cant stand knowing that there is even any chance I could potentially be able to achieve even more than I can now. What exactly does choosing the precompiled version prevent me from being able to do? Additionally, given that I already use the pre-compiled gmic, is it even possible for me to compile now? Would I have to delete everything? Would the hassle be bigger than the reward? If anyone has any input on this I would be more than grateful. Thank you!

1 Like

That’s indeed an interesting question!
I think most people will be OK with the precompiled version, but I see situations where compiling your own version of G’MIC can be interesting:

  • G’MIC is in fact highly customizable, which means you can enable/disable features provided by external libraries (which are G’MIC dependencies), at the compilation time. By default, the pre-compiled version of gmic enables a reasonable set of those features (like JPEG/PNG/TIFF file support), but you may be interested in enabling additional features that are not enabled by default. This includes for instance OpenCV features (to allow gmic access images from the webcam or load/save video files), or support for HEIC/AVIS/MINC2/OpenEXR/WebP file formats.
  • The pre-compiled version is designed to work with generic processor architectures, so the default optimization flags are not set to fine-tune to a particular architecture or processor. Compiling your own version of G’MIC can enable optimization flags specific to your architecture, and make the program slightly faster.
  • And of course, you may want to compile the G’MIC library yourself to integrate G’MIC features into your own program. In this case, it’s also important to be able to fine-tune compilation flags to enable/disable certain features and avoid potentially unnecessary dependencies (see the list of current DLL files supplied in our archive, to see that even with our default configuration, many dependencies are already necessary).

So right now, with the pre-compiled version, I’d say you don’t lose much, apart from the ability to natively receive webcam images directly into G’MIC (command camera), and support for a few image and video formats.

2 Likes