mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 19:57:14 +08:00
30 lines
684 B
Diff
30 lines
684 B
Diff
--- src/DLD-FUNCTIONS/__magick_read__.cc.orig 2010-03-06 08:05:25.000000000 +0000
|
|
+++ src/DLD-FUNCTIONS/__magick_read__.cc 2009-08-25 09:26:01.000000000 +0100
|
|
@@ -30,6 +30,7 @@
|
|
#include "defun-dld.h"
|
|
#include "error.h"
|
|
#include "ov-struct.h"
|
|
+#include "oct-env.h"
|
|
|
|
#ifdef HAVE_MAGICK
|
|
|
|
@@ -359,6 +358,18 @@
|
|
|
|
#ifdef HAVE_MAGICK
|
|
|
|
+ static bool initialized = false;
|
|
+
|
|
+ if (! initialized)
|
|
+ {
|
|
+ std::string program_name = octave_env::get_program_invocation_name ();
|
|
+
|
|
+ Magick::InitializeMagick (program_name.c_str ());
|
|
+
|
|
+ initialized = true;
|
|
+ }
|
|
+
|
|
+
|
|
if (args.length () > 2 || args.length () < 1 || ! args(0).is_string ()
|
|
|| nargout > 3)
|
|
{
|