Re: SVG to PNG
Bob Friesenhahn <[email protected]> Tue, 24 Nov 2020 13:36:23 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 24 Nov 2020, Pro Turm wrote: >> it cuts out the last folder name of the path, thinking it is a binary. > and sets the clientPath truncated. > it is assumed that the path argument for InitializeMagick(const char *path) > ends with a "/" to not to take the ending folder name as for a binary name. Normally this provided path is the last information source which is consulted (if all else fails). Normally the last path component (after a "/") would be the name of the program itself. For example, it might be obtained via argv[0]. The sample/test programs do something like this using the argument list provided from main(): InitializeMagick(*argv); > 2) blob.c, if GM is not installed #if defined(UseInstalledMagick) > then what is the possibility over magic_config.h (and not over environment > variables) to determine the location of the configuration path ? > It seems the answer is None. Under Windows, the path used is obtained via NTGetExecutionPath() in magick/nt_base.c. This function uses the GetModuleFileName() sytem API. It likely makes a difference if the program is "static" compiled without any additional GM libraries, or if the program uses DLLs. If the program uses DLLs, the reported path is likely the location of the DLL since this code would reside in a DLL. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt