blob: e1f0262426ae33e269996902a72a6fbeb2aac43d [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3% %
4% %
5% %
6% EEEEE M M FFFFF %
7% E MM MM F %
8% EEE M M M FFF %
9% E M M F %
10% EEEEE M M F %
11% %
12% %
13% Read Windows Enahanced Metafile Format %
14% %
15% Software Design %
16% Bill Radcliffe %
17% 2001 %
18% %
cristy7e41fe82010-12-04 23:12:08 +000019% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
cristy3ed852e2009-09-05 21:47:34 +000020% dedicated to making software imaging solutions freely available. %
21% %
22% You may not use this file except in compliance with the License. You may %
23% obtain a copy of the License at %
24% %
25% http://www.imagemagick.org/script/license.php %
26% %
27% Unless required by applicable law or agreed to in writing, software %
28% distributed under the License is distributed on an "AS IS" BASIS, %
29% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
30% See the License for the specific language governing permissions and %
31% limitations under the License. %
32% %
33%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34*/
35
36/*
37 * Include declarations.
38 */
39
cristy4c08aed2011-07-01 19:47:50 +000040#include "MagickCore/studio.h"
cristy3ed852e2009-09-05 21:47:34 +000041#if defined(MAGICKCORE_WINGDI32_DELEGATE)
42# if defined(__CYGWIN__)
43# include <windows.h>
44# else
cristy3ed852e2009-09-05 21:47:34 +000045# include <wingdi.h>
46# endif
47#endif
48
cristy4c08aed2011-07-01 19:47:50 +000049#include "MagickCore/blob.h"
50#include "MagickCore/blob-private.h"
51#include "MagickCore/cache.h"
52#include "MagickCore/exception.h"
53#include "MagickCore/exception-private.h"
54#include "MagickCore/geometry.h"
55#include "MagickCore/image.h"
56#include "MagickCore/image-private.h"
57#include "MagickCore/list.h"
58#include "MagickCore/magick.h"
59#include "MagickCore/memory_.h"
60#include "MagickCore/pixel.h"
cristy6c9c9e82011-08-05 14:27:57 +000061#include "MagickCore/pixel-accessor.h"
cristy4c08aed2011-07-01 19:47:50 +000062#include "MagickCore/quantum-private.h"
63#include "MagickCore/static.h"
64#include "MagickCore/string_.h"
65#include "MagickCore/module.h"
cristy3ed852e2009-09-05 21:47:34 +000066
67/*
68%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69% %
70% %
71% %
72% I s E F M %
73% %
74% %
75% %
76%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77%
78% IsEMF() returns MagickTrue if the image format type, identified by the
79% magick string, is a Microsoft Windows Enhanced MetaFile (EMF) file.
80%
81% The format of the ReadEMFImage method is:
82%
83% MagickBooleanType IsEMF(const unsigned char *magick,const size_t length)
84%
85% A description of each parameter follows:
86%
87% o magick: compare image format pattern against these bytes.
88%
89% o length: Specifies the length of the magick string.
90%
91*/
92static MagickBooleanType IsEMF(const unsigned char *magick,const size_t length)
93{
94 if (length < 48)
95 return(MagickFalse);
96 if (memcmp(magick+40,"\040\105\115\106\000\000\001\000",8) == 0)
97 return(MagickTrue);
98 return(MagickFalse);
99}
100
101/*
102%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103% %
104% %
105% %
106% I s W M F %
107% %
108% %
109% %
110%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111%
112% IsWMF() returns MagickTrue if the image format type, identified by the
113% magick string, is a Windows MetaFile (WMF) file.
114%
115% The format of the ReadEMFImage method is:
116%
117% MagickBooleanType IsEMF(const unsigned char *magick,const size_t length)
118%
119% A description of each parameter follows:
120%
121% o magick: compare image format pattern against these bytes.
122%
123% o length: Specifies the length of the magick string.
124%
125*/
126static MagickBooleanType IsWMF(const unsigned char *magick,const size_t length)
127{
128 if (length < 4)
129 return(MagickFalse);
130 if (memcmp(magick,"\327\315\306\232",4) == 0)
131 return(MagickTrue);
132 if (memcmp(magick,"\001\000\011\000",4) == 0)
133 return(MagickTrue);
134 return(MagickFalse);
135}
136
137/*
138%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139% %
140% %
141% %
142% R e a d E M F I m a g e %
143% %
144% %
145% %
146%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147%
148% ReadEMFImage() reads an Microsoft Windows Enhanced MetaFile (EMF) or
149% Windows MetaFile (WMF) file using the Windows API and returns it. It
150% allocates the memory necessary for the new Image structure and returns a
151% pointer to the new image.
152%
153% The format of the ReadEMFImage method is:
154%
155% Image *ReadEMFImage(const ImageInfo *image_info,
156% ExceptionInfo *exception)
157%
158% A description of each parameter follows:
159%
160% o image_info: the image info..
161%
162% o exception: return any errors or warnings in this structure.
163%
164*/
165
cristy3ed852e2009-09-05 21:47:34 +0000166/*
167 This method reads either an enhanced metafile, a regular 16bit Windows
168 metafile, or an Aldus Placeable metafile and converts it into an enhanced
169 metafile. Width and height are returned in .01mm units.
170*/
171#if defined(MAGICKCORE_WINGDI32_DELEGATE)
cristybb503372010-05-27 20:51:26 +0000172static HENHMETAFILE ReadEnhMetaFile(const char *path,ssize_t *width,
173 ssize_t *height)
cristy3ed852e2009-09-05 21:47:34 +0000174{
cristy1f9e1ed2009-11-18 04:09:38 +0000175#pragma pack( push, 2 )
cristy3ed852e2009-09-05 21:47:34 +0000176 typedef struct
177 {
178 DWORD dwKey;
179 WORD hmf;
180 SMALL_RECT bbox;
181 WORD wInch;
182 DWORD dwReserved;
183 WORD wCheckSum;
184 } APMHEADER, *PAPMHEADER;
185#pragma pack( pop )
186
187 DWORD
188 dwSize;
189
190 ENHMETAHEADER
191 emfh;
192
193 HANDLE
194 hFile;
195
196 HDC
197 hDC;
198
199 HENHMETAFILE
200 hTemp;
201
202 LPBYTE
203 pBits;
204
205 METAFILEPICT
206 mp;
207
208 HMETAFILE
209 hOld;
210
211 *width=512;
212 *height=512;
213 hTemp=GetEnhMetaFile(path);
214#if defined(MAGICKCORE_HAVE__WFOPEN)
215 if (hTemp == (HENHMETAFILE) NULL)
216 {
cristy9d5bf452011-08-05 13:25:47 +0000217 int
218 count;
219
cristy3ed852e2009-09-05 21:47:34 +0000220 wchar_t
221 *unicode_path;
222
cristyc81eb6d2011-08-06 02:11:06 +0000223 count=MultiByteToWideChar(CP_ACP,0,path,-1,(wchar_t) NULL,0);
cristy9d5bf452011-08-05 13:25:47 +0000224 unicode_path=(wchar_t *) AcquireQuantumMemory(count,
225 sizeof(*unicode_path));
cristy3ed852e2009-09-05 21:47:34 +0000226 if (unicode_path != (wchar_t *) NULL)
227 {
cristyc81eb6d2011-08-06 02:11:06 +0000228 count=MultiByteToWideChar(CP_ACP,0,path,-1,unicode_path,count);
cristy3ed852e2009-09-05 21:47:34 +0000229 hTemp=GetEnhMetaFileW(unicode_path);
230 unicode_path=(wchar_t *) RelinquishMagickMemory(unicode_path);
231 }
232 }
233#endif
234 if (hTemp != (HENHMETAFILE) NULL)
235 {
236 /*
237 Enhanced metafile.
238 */
239 GetEnhMetaFileHeader(hTemp,sizeof(ENHMETAHEADER),&emfh);
240 *width=emfh.rclFrame.right-emfh.rclFrame.left;
241 *height=emfh.rclFrame.bottom-emfh.rclFrame.top;
242 return(hTemp);
243 }
244 hOld=GetMetaFile(path);
245 if (hOld != (HMETAFILE) NULL)
246 {
247 /*
248 16bit windows metafile.
249 */
250 dwSize=GetMetaFileBitsEx(hOld,0,NULL);
251 if (dwSize == 0)
252 {
253 DeleteMetaFile(hOld);
254 return((HENHMETAFILE) NULL);
255 }
256 pBits=(LPBYTE) AcquireQuantumMemory(dwSize,sizeof(*pBits));
257 if (pBits == (LPBYTE) NULL)
258 {
259 DeleteMetaFile(hOld);
260 return((HENHMETAFILE) NULL);
261 }
262 if (GetMetaFileBitsEx(hOld,dwSize,pBits) == 0)
263 {
264 pBits=(BYTE *) DestroyString((char *) pBits);
265 DeleteMetaFile(hOld);
266 return((HENHMETAFILE) NULL);
267 }
268 /*
269 Make an enhanced metafile from the windows metafile.
270 */
271 mp.mm=MM_ANISOTROPIC;
272 mp.xExt=1000;
273 mp.yExt=1000;
274 mp.hMF=NULL;
275 hDC=GetDC(NULL);
276 hTemp=SetWinMetaFileBits(dwSize,pBits,hDC,&mp);
277 ReleaseDC(NULL,hDC);
278 DeleteMetaFile(hOld);
279 pBits=(BYTE *) DestroyString((char *) pBits);
280 GetEnhMetaFileHeader(hTemp,sizeof(ENHMETAHEADER),&emfh);
281 *width=emfh.rclFrame.right-emfh.rclFrame.left;
282 *height=emfh.rclFrame.bottom-emfh.rclFrame.top;
283 return(hTemp);
284 }
285 /*
286 Aldus Placeable metafile.
287 */
288 hFile=CreateFile(path,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,
289 NULL);
290 if (hFile == INVALID_HANDLE_VALUE)
291 return(NULL);
292 dwSize=GetFileSize(hFile,NULL);
293 pBits=(LPBYTE) AcquireQuantumMemory(dwSize,sizeof(*pBits));
294 ReadFile(hFile,pBits,dwSize,&dwSize,NULL);
295 CloseHandle(hFile);
296 if (((PAPMHEADER) pBits)->dwKey != 0x9ac6cdd7l)
297 {
298 pBits=(BYTE *) DestroyString((char *) pBits);
299 return((HENHMETAFILE) NULL);
300 }
301 /*
302 Make an enhanced metafile from the placable metafile.
303 */
304 mp.mm=MM_ANISOTROPIC;
305 mp.xExt=((PAPMHEADER) pBits)->bbox.Right-((PAPMHEADER) pBits)->bbox.Left;
306 *width=mp.xExt;
307 mp.xExt=(mp.xExt*2540l)/(DWORD) (((PAPMHEADER) pBits)->wInch);
308 mp.yExt=((PAPMHEADER)pBits)->bbox.Bottom-((PAPMHEADER) pBits)->bbox.Top;
309 *height=mp.yExt;
310 mp.yExt=(mp.yExt*2540l)/(DWORD) (((PAPMHEADER) pBits)->wInch);
311 mp.hMF=NULL;
312 hDC=GetDC(NULL);
313 hTemp=SetWinMetaFileBits(dwSize,&(pBits[sizeof(APMHEADER)]),hDC,&mp);
314 ReleaseDC(NULL,hDC);
315 pBits=(BYTE *) DestroyString((char *) pBits);
316 return(hTemp);
317}
318
319#define CENTIMETERS_INCH 2.54
320
321static Image *ReadEMFImage(const ImageInfo *image_info,
322 ExceptionInfo *exception)
323{
324 BITMAPINFO
325 DIBinfo;
326
327 HBITMAP
328 hBitmap,
329 hOldBitmap;
330
331 HDC
332 hDC;
333
334 HENHMETAFILE
335 hemf;
336
337 Image
338 *image;
339
cristy3ed852e2009-09-05 21:47:34 +0000340 RECT
341 rect;
342
cristybb503372010-05-27 20:51:26 +0000343 register ssize_t
cristy3ed852e2009-09-05 21:47:34 +0000344 x;
345
cristy4c08aed2011-07-01 19:47:50 +0000346 register Quantum
cristy3ed852e2009-09-05 21:47:34 +0000347 *q;
348
349 RGBQUAD
350 *pBits,
351 *ppBits;
352
cristy202de442011-04-24 18:19:07 +0000353 ssize_t
354 height,
355 width,
356 y;
357
cristy3ed852e2009-09-05 21:47:34 +0000358 image=AcquireImage(image_info);
359 hemf=ReadEnhMetaFile(image_info->filename,&width,&height);
360 if (hemf == (HENHMETAFILE) NULL)
361 ThrowReaderException(CorruptImageError,"ImproperImageHeader");
362 if ((image->columns == 0) || (image->rows == 0))
363 {
364 double
365 y_resolution,
366 x_resolution;
367
368 y_resolution=DefaultResolution;
369 x_resolution=DefaultResolution;
370 if (image->y_resolution > 0)
371 {
372 y_resolution=image->y_resolution;
373 if (image->units == PixelsPerCentimeterResolution)
374 y_resolution*=CENTIMETERS_INCH;
375 }
376 if (image->x_resolution > 0)
377 {
378 x_resolution=image->x_resolution;
379 if (image->units == PixelsPerCentimeterResolution)
380 x_resolution*=CENTIMETERS_INCH;
381 }
cristy202de442011-04-24 18:19:07 +0000382 image->rows=(size_t) ((height/1000.0/CENTIMETERS_INCH)*y_resolution+0.5);
cristybb503372010-05-27 20:51:26 +0000383 image->columns=(size_t) ((width/1000.0/CENTIMETERS_INCH)*
cristy3ed852e2009-09-05 21:47:34 +0000384 x_resolution+0.5);
385 }
386 if (image_info->size != (char *) NULL)
387 {
cristybb503372010-05-27 20:51:26 +0000388 ssize_t
cristy3ed852e2009-09-05 21:47:34 +0000389 x;
390
391 image->columns=width;
392 image->rows=height;
393 x=0;
394 y=0;
395 (void) GetGeometry(image_info->size,&x,&y,&image->columns,&image->rows);
396 }
397 if (image_info->page != (char *) NULL)
398 {
399 char
400 *geometry;
401
cristy3ed852e2009-09-05 21:47:34 +0000402 register char
403 *p;
404
405 MagickStatusType
406 flags;
407
cristy202de442011-04-24 18:19:07 +0000408 ssize_t
409 sans;
410
cristy3ed852e2009-09-05 21:47:34 +0000411 geometry=GetPageGeometry(image_info->page);
412 p=strchr(geometry,'>');
413 if (p == (char *) NULL)
414 {
415 flags=ParseMetaGeometry(geometry,&sans,&sans,&image->columns,
416 &image->rows);
417 if (image->x_resolution != 0.0)
cristy202de442011-04-24 18:19:07 +0000418 image->columns=(size_t) floor((image->columns*image->x_resolution)+
cristy06609ee2010-03-17 20:21:27 +0000419 0.5);
cristy202de442011-04-24 18:19:07 +0000420 if (image->y_resolution != 0.0)
421 image->rows=(size_t) floor((image->rows*image->y_resolution)+0.5);
cristy3ed852e2009-09-05 21:47:34 +0000422 }
423 else
424 {
425 *p='\0';
426 flags=ParseMetaGeometry(geometry,&sans,&sans,&image->columns,
427 &image->rows);
428 if (image->x_resolution != 0.0)
cristy202de442011-04-24 18:19:07 +0000429 image->columns=(size_t) floor(((image->columns*image->x_resolution)/
430 DefaultResolution)+0.5);
cristy3ed852e2009-09-05 21:47:34 +0000431 if (image->y_resolution != 0.0)
cristy202de442011-04-24 18:19:07 +0000432 image->rows=(size_t) floor(((image->rows*image->y_resolution)/
433 DefaultResolution)+0.5);
cristy3ed852e2009-09-05 21:47:34 +0000434 }
435 geometry=DestroyString(geometry);
436 }
437 hDC=GetDC(NULL);
438 if (hDC == (HDC) NULL)
439 {
440 DeleteEnhMetaFile(hemf);
441 ThrowReaderException(ResourceLimitError,"UnableToCreateADC");
442 }
443 /*
444 Initialize the bitmap header info.
445 */
446 (void) ResetMagickMemory(&DIBinfo,0,sizeof(BITMAPINFO));
447 DIBinfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
cristyeaedf062010-05-29 22:36:02 +0000448 DIBinfo.bmiHeader.biWidth=(LONG) image->columns;
449 DIBinfo.bmiHeader.biHeight=(-1)*(LONG) image->rows;
cristy3ed852e2009-09-05 21:47:34 +0000450 DIBinfo.bmiHeader.biPlanes=1;
451 DIBinfo.bmiHeader.biBitCount=32;
452 DIBinfo.bmiHeader.biCompression=BI_RGB;
cristy202de442011-04-24 18:19:07 +0000453 hBitmap=CreateDIBSection(hDC,&DIBinfo,DIB_RGB_COLORS,(void **) &ppBits,NULL,
454 0);
cristy3ed852e2009-09-05 21:47:34 +0000455 ReleaseDC(NULL,hDC);
456 if (hBitmap == (HBITMAP) NULL)
457 {
458 DeleteEnhMetaFile(hemf);
459 ThrowReaderException(ResourceLimitError,"UnableToCreateBitmap");
460 }
461 hDC=CreateCompatibleDC(NULL);
462 if (hDC == (HDC) NULL)
463 {
464 DeleteEnhMetaFile(hemf);
465 DeleteObject(hBitmap);
466 ThrowReaderException(ResourceLimitError,"UnableToCreateADC");
467 }
468 hOldBitmap=(HBITMAP) SelectObject(hDC,hBitmap);
469 if (hOldBitmap == (HBITMAP) NULL)
470 {
471 DeleteEnhMetaFile(hemf);
472 DeleteDC(hDC);
473 DeleteObject(hBitmap);
474 ThrowReaderException(ResourceLimitError,"UnableToCreateBitmap");
475 }
476 /*
477 Initialize the bitmap to the image background color.
478 */
479 pBits=ppBits;
cristybb503372010-05-27 20:51:26 +0000480 for (y=0; y < (ssize_t) image->rows; y++)
cristy3ed852e2009-09-05 21:47:34 +0000481 {
cristybb503372010-05-27 20:51:26 +0000482 for (x=0; x < (ssize_t) image->columns; x++)
cristy3ed852e2009-09-05 21:47:34 +0000483 {
484 pBits->rgbRed=ScaleQuantumToChar(image->background_color.red);
485 pBits->rgbGreen=ScaleQuantumToChar(image->background_color.green);
486 pBits->rgbBlue=ScaleQuantumToChar(image->background_color.blue);
487 pBits++;
488 }
489 }
490 rect.top=0;
491 rect.left=0;
cristyeaedf062010-05-29 22:36:02 +0000492 rect.right=(LONG) image->columns;
493 rect.bottom=(LONG) image->rows;
cristy3ed852e2009-09-05 21:47:34 +0000494 /*
495 Convert metafile pixels.
496 */
497 PlayEnhMetaFile(hDC,hemf,&rect);
498 pBits=ppBits;
cristybb503372010-05-27 20:51:26 +0000499 for (y=0; y < (ssize_t) image->rows; y++)
cristy3ed852e2009-09-05 21:47:34 +0000500 {
501 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
cristy4c08aed2011-07-01 19:47:50 +0000502 if (q == (const Quantum *) NULL)
cristy3ed852e2009-09-05 21:47:34 +0000503 break;
cristybb503372010-05-27 20:51:26 +0000504 for (x=0; x < (ssize_t) image->columns; x++)
cristy3ed852e2009-09-05 21:47:34 +0000505 {
cristy4c08aed2011-07-01 19:47:50 +0000506 SetPixelRed(image,ScaleCharToQuantum(pBits->rgbRed),q);
507 SetPixelGreen(image,ScaleCharToQuantum(pBits->rgbGreen),q);
508 SetPixelBlue(image,ScaleCharToQuantum(pBits->rgbBlue),q);
509 SetPixelAlpha(image,OpaqueAlpha,q);
cristy3ed852e2009-09-05 21:47:34 +0000510 pBits++;
cristyed231572011-07-14 02:18:59 +0000511 q+=GetPixelChannels(image);
cristy3ed852e2009-09-05 21:47:34 +0000512 }
513 if (SyncAuthenticPixels(image,exception) == MagickFalse)
514 break;
515 }
516 DeleteEnhMetaFile(hemf);
517 SelectObject(hDC,hOldBitmap);
518 DeleteDC(hDC);
519 DeleteObject(hBitmap);
520 return(GetFirstImageInList(image));
521}
522#endif /* MAGICKCORE_WINGDI32_DELEGATE */
523
524/*
525%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
526% %
527% %
528% %
529% R e g i s t e r E M F I m a g e %
530% %
531% %
532% %
533%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
534%
535% RegisterEMFImage() adds attributes for the EMF image format to
536% the list of supported formats. The attributes include the image format
537% tag, a method to read and/or write the format, whether the format
538% supports the saving of more than one frame to the same file or blob,
539% whether the format supports native in-memory I/O, and a brief
540% description of the format.
541%
542% The format of the RegisterEMFImage method is:
543%
cristybb503372010-05-27 20:51:26 +0000544% size_t RegisterEMFImage(void)
cristy3ed852e2009-09-05 21:47:34 +0000545%
546*/
cristybb503372010-05-27 20:51:26 +0000547ModuleExport size_t RegisterEMFImage(void)
cristy3ed852e2009-09-05 21:47:34 +0000548{
549 MagickInfo
550 *entry;
551
552 entry=SetMagickInfo("EMF");
553#if defined(MAGICKCORE_WINGDI32_DELEGATE)
554 entry->decoder=ReadEMFImage;
555#endif
556 entry->description=ConstantString(
557 "Windows WIN32 API rendered Enhanced Meta File");
558 entry->magick=(IsImageFormatHandler *) IsEMF;
559 entry->blob_support=MagickFalse;
560 entry->module=ConstantString("WMF");
561 (void) RegisterMagickInfo(entry);
562 entry=SetMagickInfo("WMFWIN32");
563#if defined(MAGICKCORE_WINGDI32_DELEGATE)
564 entry->decoder=ReadEMFImage;
565#endif
566 entry->description=ConstantString("Windows WIN32 API rendered Meta File");
567 entry->magick=(IsImageFormatHandler *) IsWMF;
568 entry->blob_support=MagickFalse;
569 entry->module=ConstantString("WMFWIN32");
570 (void) RegisterMagickInfo(entry);
571 return(MagickImageCoderSignature);
572}
573
574/*
575%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
576% %
577% %
578% %
579% U n r e g i s t e r E M F I m a g e %
580% %
581% %
582% %
583%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
584%
585% UnregisterEMFImage() removes format registrations made by the
586% EMF module from the list of supported formats.
587%
588% The format of the UnregisterEMFImage method is:
589%
590% UnregisterEMFImage(void)
591%
592*/
593ModuleExport void UnregisterEMFImage(void)
594{
595 (void) UnregisterMagickInfo("EMF");
596 (void) UnregisterMagickInfo("WMFWIN32");
597}