diff options
| author | Glenn Morris | 2019-12-25 07:50:19 -0800 |
|---|---|---|
| committer | Glenn Morris | 2019-12-25 07:50:19 -0800 |
| commit | 2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09 (patch) | |
| tree | 3317f66921cf3cd0d787816217bfd056e2bc2a3f /src/image.c | |
| parent | 93d4725f9ceabfaf40e75ecf2e28b67789741941 (diff) | |
| parent | ca6a53d3bc91d6fef9aa872495ab74298ce91bee (diff) | |
| download | emacs-2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09.tar.gz emacs-2bb7bb4abfa5667ba5cd220ca3dd89731f33ff09.zip | |
Merge from origin/emacs-27
ca6a53d3bc Don't default to showing X-Faces externally in Gnus
dbf4b5b2d0 Fix manual typo in Special Read Syntax
a9fe6dfa90 Fix problem with emacs -nw / eww / svg
0de63092c8 Clarify base64 requirements and say what {en,de}code_codin...
6184aa003f ; * etc/NEWS: Fix boring oddities.
51ea32dd12 * src/emacs-module.h.in: Add reference to manual.
75d0cef20d Trivial docstring fixes
ee12c421b6 imagemagick-types needs to initialize ImageMagick
# Conflicts:
# etc/NEWS
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/image.c b/src/image.c index 70d932f9edb..fc90c5ea74b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8603,6 +8603,17 @@ extern WandExport void PixelGetMagickColor (const PixelWand *, | |||
| 8603 | MagickPixelPacket *); | 8603 | MagickPixelPacket *); |
| 8604 | #endif | 8604 | #endif |
| 8605 | 8605 | ||
| 8606 | static void | ||
| 8607 | imagemagick_initialize (void) | ||
| 8608 | { | ||
| 8609 | static bool imagemagick_initialized; | ||
| 8610 | if (!imagemagick_initialized) | ||
| 8611 | { | ||
| 8612 | imagemagick_initialized = true; | ||
| 8613 | MagickWandGenesis (); | ||
| 8614 | } | ||
| 8615 | } | ||
| 8616 | |||
| 8606 | /* Log ImageMagick error message. | 8617 | /* Log ImageMagick error message. |
| 8607 | Useful when an ImageMagick function returns the status `MagickFalse'. */ | 8618 | Useful when an ImageMagick function returns the status `MagickFalse'. */ |
| 8608 | 8619 | ||
| @@ -8874,14 +8885,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 8874 | double rotation; | 8885 | double rotation; |
| 8875 | char hint_buffer[MaxTextExtent]; | 8886 | char hint_buffer[MaxTextExtent]; |
| 8876 | char *filename_hint = NULL; | 8887 | char *filename_hint = NULL; |
| 8877 | 8888 | imagemagick_initialize (); | |
| 8878 | /* Initialize the ImageMagick environment. */ | ||
| 8879 | static bool imagemagick_initialized; | ||
| 8880 | if (!imagemagick_initialized) | ||
| 8881 | { | ||
| 8882 | imagemagick_initialized = true; | ||
| 8883 | MagickWandGenesis (); | ||
| 8884 | } | ||
| 8885 | 8889 | ||
| 8886 | /* Handle image index for image types who can contain more than one image. | 8890 | /* Handle image index for image types who can contain more than one image. |
| 8887 | Interface :index is same as for GIF. First we "ping" the image to see how | 8891 | Interface :index is same as for GIF. First we "ping" the image to see how |
| @@ -9290,6 +9294,7 @@ and `imagemagick-types-inhibit'. */) | |||
| 9290 | char **imtypes; | 9294 | char **imtypes; |
| 9291 | size_t i; | 9295 | size_t i; |
| 9292 | 9296 | ||
| 9297 | imagemagick_initialize (); | ||
| 9293 | ex = AcquireExceptionInfo (); | 9298 | ex = AcquireExceptionInfo (); |
| 9294 | imtypes = GetMagickList ("*", &numf, ex); | 9299 | imtypes = GetMagickList ("*", &numf, ex); |
| 9295 | DestroyExceptionInfo (ex); | 9300 | DestroyExceptionInfo (ex); |