MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
nt-feature.c
Go to the documentation of this file.
1 /*
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % %
4 % %
5 % %
6 % %
7 % N N TTTTT %
8 % NN N T %
9 % N N N T %
10 % N NN T %
11 % N N T %
12 % %
13 % %
14 % Windows NT Feature Methods for MagickCore %
15 % %
16 % Software Design %
17 % Cristy %
18 % December 1996 %
19 % %
20 % %
21 % Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
22 % dedicated to making software imaging solutions freely available. %
23 % %
24 % You may not use this file except in compliance with the License. You may %
25 % obtain a copy of the License at %
26 % %
27 % https://www.imagemagick.org/script/license.php %
28 % %
29 % Unless required by applicable law or agreed to in writing, software %
30 % distributed under the License is distributed on an "AS IS" BASIS, %
31 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
32 % See the License for the specific language governing permissions and %
33 % limitations under the License. %
34 % %
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 %
37 %
38 */
39 
40 /*
41  Include declarations.
42 */
43 #include "MagickCore/studio.h"
44 #if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__)
45 #define WIN32_LEAN_AND_MEAN
46 #define VC_EXTRALEAN
47 #include <windows.h>
48 #include "MagickCore/cache.h"
49 #include "MagickCore/colorspace.h"
51 #include "MagickCore/draw.h"
52 #include "MagickCore/exception.h"
55 #include "MagickCore/memory_.h"
57 #include "MagickCore/monitor.h"
59 #include "MagickCore/nt-base.h"
62 #include "MagickCore/quantum.h"
63 #include "MagickCore/string_.h"
64 #include "MagickCore/token.h"
65 #include "MagickCore/splay-tree.h"
66 #include "MagickCore/utility.h"
67 
68 /*
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 % %
71 % %
72 % %
73 % C r o p I m a g e T o H B i t m a p %
74 % %
75 % %
76 % %
77 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78 %
79 % CropImageToHBITMAP() extracts a specified region of the image and returns
80 % it as a Windows HBITMAP. While the same functionality can be accomplished by
81 % invoking CropImage() followed by ImageToHBITMAP(), this method is more
82 % efficient since it copies pixels directly to the HBITMAP.
83 %
84 % The format of the CropImageToHBITMAP method is:
85 %
86 % HBITMAP CropImageToHBITMAP(Image* image,const RectangleInfo *geometry,
87 % ExceptionInfo *exception)
88 %
89 % A description of each parameter follows:
90 %
91 % o image: the image.
92 %
93 % o geometry: Define the region of the image to crop with members
94 % x, y, width, and height.
95 %
96 % o exception: return any errors or warnings in this structure.
97 %
98 */
100  const RectangleInfo *geometry,ExceptionInfo *exception)
101 {
102 #define CropImageTag "Crop/Image"
103 
104  BITMAP
105  bitmap;
106 
107  HBITMAP
108  bitmapH;
109 
110  HANDLE
111  bitmap_bitsH;
112 
114  proceed;
115 
117  page;
118 
119  register const Quantum
120  *p;
121 
122  register RGBQUAD
123  *q;
124 
125  RGBQUAD
126  *bitmap_bits;
127 
128  ssize_t
129  y;
130 
131  /*
132  Check crop geometry.
133  */
134  assert(image != (const Image *) NULL);
135  assert(image->signature == MagickCoreSignature);
136  if (image->debug != MagickFalse)
138  assert(geometry != (const RectangleInfo *) NULL);
139  assert(exception != (ExceptionInfo *) NULL);
140  assert(exception->signature == MagickCoreSignature);
141  if (((geometry->x+(ssize_t) geometry->width) < 0) ||
142  ((geometry->y+(ssize_t) geometry->height) < 0) ||
143  (geometry->x >= (ssize_t) image->columns) ||
144  (geometry->y >= (ssize_t) image->rows))
145  ThrowImageException(OptionError,"GeometryDoesNotContainImage");
146  page=(*geometry);
147  if ((page.x+(ssize_t) page.width) > (ssize_t) image->columns)
148  page.width=image->columns-page.x;
149  if ((page.y+(ssize_t) page.height) > (ssize_t) image->rows)
150  page.height=image->rows-page.y;
151  if (page.x < 0)
152  {
153  page.width+=page.x;
154  page.x=0;
155  }
156  if (page.y < 0)
157  {
158  page.height+=page.y;
159  page.y=0;
160  }
161 
162  if ((page.width == 0) || (page.height == 0))
163  ThrowImageException(OptionError,"GeometryDimensionsAreZero");
164  /*
165  Initialize crop image attributes.
166  */
167  bitmap.bmType = 0;
168  bitmap.bmWidth = (LONG) page.width;
169  bitmap.bmHeight = (LONG) page.height;
170  bitmap.bmWidthBytes = bitmap.bmWidth * 4;
171  bitmap.bmPlanes = 1;
172  bitmap.bmBitsPixel = 32;
173  bitmap.bmBits = NULL;
174 
175  bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,page.width*
176  page.height*bitmap.bmBitsPixel);
177  if (bitmap_bitsH == NULL)
178  return(NULL);
179  bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH);
180  if ( bitmap.bmBits == NULL )
181  bitmap.bmBits = bitmap_bits;
183  SetImageColorspace(image,sRGBColorspace,exception);
184  /*
185  Extract crop image.
186  */
187  q=bitmap_bits;
188  for (y=0; y < (ssize_t) page.height; y++)
189  {
190  register ssize_t
191  x;
192 
193  p=GetVirtualPixels(image,page.x,page.y+y,page.width,1,exception);
194  if (p == (const Quantum *) NULL)
195  break;
196 
197  /* Transfer pixels, scaling to Quantum */
198  for( x=(ssize_t) page.width ; x> 0 ; x-- )
199  {
200  q->rgbRed = ScaleQuantumToChar(GetPixelRed(image,p));
201  q->rgbGreen = ScaleQuantumToChar(GetPixelGreen(image,p));
202  q->rgbBlue = ScaleQuantumToChar(GetPixelBlue(image,p));
203  q->rgbReserved = 0;
204  p+=GetPixelChannels(image);
205  q++;
206  }
207  proceed=SetImageProgress(image,CropImageTag,y,page.height);
208  if (proceed == MagickFalse)
209  break;
210  }
211  if (y < (ssize_t) page.height)
212  {
213  GlobalUnlock((HGLOBAL) bitmap_bitsH);
214  GlobalFree((HGLOBAL) bitmap_bitsH);
215  return((void *) NULL);
216  }
217  bitmap.bmBits=bitmap_bits;
218  bitmapH=CreateBitmapIndirect(&bitmap);
219  GlobalUnlock((HGLOBAL) bitmap_bitsH);
220  GlobalFree((HGLOBAL) bitmap_bitsH);
221  return((void *) bitmapH);
222 }
223 
224 /*
225 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
226 % %
227 % %
228 % %
229 % I s M a g i c k C o n f l i c t %
230 % %
231 % %
232 % %
233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
234 %
235 % IsMagickConflict() returns true if the image format conflicts with a logical
236 % drive (.e.g. X:).
237 %
238 % The format of the IsMagickConflict method is:
239 %
240 % MagickBooleanType IsMagickConflict(const char *magick)
241 %
242 % A description of each parameter follows:
243 %
244 % o magick: Specifies the image format.
245 %
246 */
248 {
250  status;
251 
252  assert(magick != (char *) NULL);
253  if (strlen(magick) > 1)
254  return(MagickFalse);
255  status=(GetLogicalDrives() & (1 << ((toupper((int) (*magick)))-'A'))) != 0 ?
257  return(status);
258 }
259 
260 /*
261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
262 % %
263 % %
264 % %
265 % N T A c q u i r e T y p e C a c h e %
266 % %
267 % %
268 % %
269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 %
271 % NTAcquireTypeCache() loads a Windows TrueType fonts.
272 %
273 % The format of the NTAcquireTypeCache method is:
274 %
275 % MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *type_cache)
276 %
277 % A description of each parameter follows:
278 %
279 % o type_cache: A linked list of fonts.
280 %
281 */
283  ExceptionInfo *exception)
284 {
285  HKEY
286  reg_key = (HKEY) INVALID_HANDLE_VALUE;
287 
288  LONG
289  res;
290 
291  int
292  list_entries = 0;
293 
294  char
295  buffer[MagickPathExtent],
296  system_root[MagickPathExtent],
297  font_root[MagickPathExtent];
298 
299  DWORD
300  type,
301  system_root_length;
302 
304  status;
305 
306  /*
307  Try to find the right Windows*\CurrentVersion key, the SystemRoot and
308  then the Fonts key
309  */
310  res = RegOpenKeyExA (HKEY_LOCAL_MACHINE,
311  "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &reg_key);
312  if (res == ERROR_SUCCESS) {
313  system_root_length=sizeof(system_root)-1;
314  res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type,
315  (BYTE*) system_root, &system_root_length);
316  }
317  if (res != ERROR_SUCCESS) {
318  res = RegOpenKeyExA (HKEY_LOCAL_MACHINE,
319  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", 0, KEY_READ, &reg_key);
320  if (res == ERROR_SUCCESS) {
321  system_root_length=sizeof(system_root)-1;
322  res = RegQueryValueExA(reg_key,"SystemRoot",NULL, &type,
323  (BYTE*)system_root, &system_root_length);
324  }
325  }
326  if (res == ERROR_SUCCESS)
327  res = RegOpenKeyExA (reg_key, "Fonts",0, KEY_READ, &reg_key);
328  if (res != ERROR_SUCCESS)
329  return(MagickFalse);
330  *font_root='\0';
331  (void) CopyMagickString(buffer,system_root,MagickPathExtent);
332  (void) ConcatenateMagickString(buffer,"\\fonts\\arial.ttf",MagickPathExtent);
333  if (IsPathAccessible(buffer) != MagickFalse)
334  {
335  (void) CopyMagickString(font_root,system_root,MagickPathExtent);
336  (void) ConcatenateMagickString(font_root,"\\fonts\\",MagickPathExtent);
337  }
338  else
339  {
340  (void) CopyMagickString(font_root,system_root,MagickPathExtent);
342  }
343 
344  {
345  TypeInfo
346  *type_info;
347 
348  DWORD
349  registry_index = 0,
350  type,
351  value_data_size,
352  value_name_length;
353 
354  char
355  value_data[MagickPathExtent],
356  value_name[MagickPathExtent];
357 
358  res = ERROR_SUCCESS;
359 
360  while (res != ERROR_NO_MORE_ITEMS)
361  {
362  char
363  *family_extent,
364  token[MagickPathExtent],
365  *pos,
366  *q;
367 
368  value_name_length = sizeof(value_name) - 1;
369  value_data_size = sizeof(value_data) - 1;
370  res = RegEnumValueA ( reg_key, registry_index, value_name,
371  &value_name_length, 0, &type, (BYTE*)value_data, &value_data_size);
372  registry_index++;
373  if (res != ERROR_SUCCESS)
374  continue;
375  if ( (pos = strstr(value_name, " (TrueType)")) == (char*) NULL )
376  continue;
377  *pos='\0'; /* Remove (TrueType) from string */
378 
379  type_info=(TypeInfo *) AcquireCriticalMemory(sizeof(*type_info));
380  (void) ResetMagickMemory(type_info,0,sizeof(TypeInfo));
381 
382  type_info->path=ConstantString("Windows Fonts");
383  type_info->signature=MagickCoreSignature;
384 
385  /* Name */
386  (void) CopyMagickString(buffer,value_name,MagickPathExtent);
387  for(pos = buffer; *pos != 0 ; pos++)
388  if (*pos == ' ')
389  *pos = '-';
390  type_info->name=ConstantString(buffer);
391 
392  /* Fullname */
393  type_info->description=ConstantString(value_name);
394 
395  /* Format */
396  type_info->format=ConstantString("truetype");
397 
398  /* Glyphs */
399  if (strchr(value_data,'\\') != (char *) NULL)
400  (void) CopyMagickString(buffer,value_data,MagickPathExtent);
401  else
402  {
403  (void) CopyMagickString(buffer,font_root,MagickPathExtent);
404  (void) ConcatenateMagickString(buffer,value_data,MagickPathExtent);
405  }
406 
407  LocaleLower(buffer);
408  type_info->glyphs=ConstantString(buffer);
409 
410  type_info->stretch=NormalStretch;
411  type_info->style=NormalStyle;
412  type_info->weight=400;
413 
414  /* Some fonts are known to require special encodings */
415  if ( (LocaleCompare(type_info->name, "Symbol") == 0 ) ||
416  (LocaleCompare(type_info->name, "Wingdings") == 0 ) ||
417  (LocaleCompare(type_info->name, "Wingdings-2") == 0 ) ||
418  (LocaleCompare(type_info->name, "Wingdings-3") == 0 ) )
419  type_info->encoding=ConstantString("AppleRoman");
420 
421  family_extent=value_name;
422 
423  for (q=value_name; *q != '\0'; )
424  {
425  GetNextToken(q,(const char **) &q,MagickPathExtent,token);
426  if (*token == '\0')
427  break;
428 
429  if (LocaleCompare(token,"Italic") == 0)
430  {
431  type_info->style=ItalicStyle;
432  }
433 
434  else if (LocaleCompare(token,"Oblique") == 0)
435  {
436  type_info->style=ObliqueStyle;
437  }
438 
439  else if (LocaleCompare(token,"Bold") == 0)
440  {
441  type_info->weight=700;
442  }
443 
444  else if (LocaleCompare(token,"Thin") == 0)
445  {
446  type_info->weight=100;
447  }
448 
449  else if ( (LocaleCompare(token,"ExtraLight") == 0) ||
450  (LocaleCompare(token,"UltraLight") == 0) )
451  {
452  type_info->weight=200;
453  }
454 
455  else if (LocaleCompare(token,"Light") == 0)
456  {
457  type_info->weight=300;
458  }
459 
460  else if ( (LocaleCompare(token,"Normal") == 0) ||
461  (LocaleCompare(token,"Regular") == 0) )
462  {
463  type_info->weight=400;
464  }
465 
466  else if (LocaleCompare(token,"Medium") == 0)
467  {
468  type_info->weight=500;
469  }
470 
471  else if ( (LocaleCompare(token,"SemiBold") == 0) ||
472  (LocaleCompare(token,"DemiBold") == 0) )
473  {
474  type_info->weight=600;
475  }
476 
477  else if ( (LocaleCompare(token,"ExtraBold") == 0) ||
478  (LocaleCompare(token,"UltraBold") == 0) )
479  {
480  type_info->weight=800;
481  }
482 
483  else if ( (LocaleCompare(token,"Heavy") == 0) ||
484  (LocaleCompare(token,"Black") == 0) )
485  {
486  type_info->weight=900;
487  }
488 
489  else if (LocaleCompare(token,"Condensed") == 0)
490  {
491  type_info->stretch = CondensedStretch;
492  }
493 
494  else if (LocaleCompare(token,"Expanded") == 0)
495  {
496  type_info->stretch = ExpandedStretch;
497  }
498 
499  else if (LocaleCompare(token,"ExtraCondensed") == 0)
500  {
501  type_info->stretch = ExtraCondensedStretch;
502  }
503 
504  else if (LocaleCompare(token,"ExtraExpanded") == 0)
505  {
506  type_info->stretch = ExtraExpandedStretch;
507  }
508 
509  else if (LocaleCompare(token,"SemiCondensed") == 0)
510  {
511  type_info->stretch = SemiCondensedStretch;
512  }
513 
514  else if (LocaleCompare(token,"SemiExpanded") == 0)
515  {
516  type_info->stretch = SemiExpandedStretch;
517  }
518 
519  else if (LocaleCompare(token,"UltraCondensed") == 0)
520  {
521  type_info->stretch = UltraCondensedStretch;
522  }
523 
524  else if (LocaleCompare(token,"UltraExpanded") == 0)
525  {
526  type_info->stretch = UltraExpandedStretch;
527  }
528 
529  else
530  {
531  family_extent=q;
532  }
533  }
534 
535  (void) CopyMagickString(buffer,value_name,family_extent-value_name+1);
536  StripString(buffer);
537  type_info->family=ConstantString(buffer);
538 
539  list_entries++;
540  status=AddValueToSplayTree(type_cache,type_info->name,type_info);
541  if (status == MagickFalse)
543  ResourceLimitError,"MemoryAllocationFailed","`%s'",type_info->name);
544  }
545  }
546  RegCloseKey ( reg_key );
547  return(MagickTrue);
548 }
549 
550 /*
551 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
552 % %
553 % %
554 % %
555 % I m a g e T o H B i t m a p %
556 % %
557 % %
558 % %
559 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
560 %
561 % ImageToHBITMAP() creates a Windows HBITMAP from an image.
562 %
563 % The format of the ImageToHBITMAP method is:
564 %
565 % HBITMAP ImageToHBITMAP(Image *image,Exceptioninfo *exception)
566 %
567 % A description of each parameter follows:
568 %
569 % o image: the image to convert.
570 %
571 */
572 MagickExport void *ImageToHBITMAP(Image *image,ExceptionInfo *exception)
573 {
574  BITMAP
575  bitmap;
576 
577  HANDLE
578  bitmap_bitsH;
579 
580  HBITMAP
581  bitmapH;
582 
583  register ssize_t
584  x;
585 
586  register const Quantum
587  *p;
588 
589  register RGBQUAD
590  *q;
591 
592  RGBQUAD
593  *bitmap_bits;
594 
595  size_t
596  length;
597 
598  ssize_t
599  y;
600 
601  (void) ResetMagickMemory(&bitmap,0,sizeof(bitmap));
602  bitmap.bmType=0;
603  bitmap.bmWidth=(LONG) image->columns;
604  bitmap.bmHeight=(LONG) image->rows;
605  bitmap.bmWidthBytes=4*bitmap.bmWidth;
606  bitmap.bmPlanes=1;
607  bitmap.bmBitsPixel=32;
608  bitmap.bmBits=NULL;
609  length=bitmap.bmWidthBytes*bitmap.bmHeight;
610  bitmap_bitsH=(HANDLE) GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,length);
611  if (bitmap_bitsH == NULL)
612  {
613  char
614  *message;
615 
616  message=GetExceptionMessage(errno);
618  ResourceLimitError,"MemoryAllocationFailed","`%s'",message);
619  message=DestroyString(message);
620  return(NULL);
621  }
622  bitmap_bits=(RGBQUAD *) GlobalLock((HGLOBAL) bitmap_bitsH);
623  q=bitmap_bits;
624  if (bitmap.bmBits == NULL)
625  bitmap.bmBits=bitmap_bits;
626  (void) SetImageColorspace(image,sRGBColorspace,exception);
627  for (y=0; y < (ssize_t) image->rows; y++)
628  {
629  p=GetVirtualPixels(image,0,y,image->columns,1,exception);
630  if (p == (const Quantum *) NULL)
631  break;
632  for (x=0; x < (ssize_t) image->columns; x++)
633  {
634  q->rgbRed=ScaleQuantumToChar(GetPixelRed(image,p));
635  q->rgbGreen=ScaleQuantumToChar(GetPixelGreen(image,p));
636  q->rgbBlue=ScaleQuantumToChar(GetPixelBlue(image,p));
637  q->rgbReserved=0;
638  p+=GetPixelChannels(image);
639  q++;
640  }
641  }
642  bitmap.bmBits=bitmap_bits;
643  bitmapH=CreateBitmapIndirect(&bitmap);
644  if (bitmapH == NULL)
645  {
646  char
647  *message;
648 
649  message=GetExceptionMessage(errno);
651  ResourceLimitError,"MemoryAllocationFailed","`%s'",message);
652  message=DestroyString(message);
653  }
654  GlobalUnlock((HGLOBAL) bitmap_bitsH);
655  GlobalFree((HGLOBAL) bitmap_bitsH);
656  return((void *) bitmapH);
657 }
658 
659 #endif
size_t rows
Definition: image.h:172
static MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
MagickExport void * CropImageToHBITMAP(Image *, const RectangleInfo *, ExceptionInfo *)
MagickExport MagickBooleanType AddValueToSplayTree(SplayTreeInfo *splay_tree, const void *key, const void *value)
Definition: splay-tree.c:154
static Quantum GetPixelRed(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
char * description
Definition: type.h:55
size_t signature
Definition: exception.h:123
MagickExport size_t ConcatenateMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:410
static SplayTreeInfo * type_cache
Definition: type.c:126
char * path
Definition: type.h:55
void(MagickDLLCall *delete_instance)(gs_main_instance *)
MagickExport char * GetExceptionMessage(const int error)
Definition: exception.c:471
size_t weight
Definition: type.h:67
MagickExport void StripString(char *message)
Definition: string.c:2473
size_t width
Definition: geometry.h:129
Definition: log.h:52
Definition: image.h:151
#define MagickCoreSignature
MagickBooleanType
Definition: magick-type.h:156
MagickExport void LocaleLower(char *string)
Definition: locale.c:1462
char * family
Definition: type.h:55
MagickExport void * ResetMagickMemory(void *memory, int byte, const size_t size)
Definition: memory.c:1164
static MagickBooleanType IssRGBCompatibleColorspace(const ColorspaceType colorspace)
MagickExport const Quantum * GetVirtualPixels(const Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache.c:3154
StretchType stretch
Definition: type.h:64
MagickExport MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *, ExceptionInfo *)
#define MagickPathExtent
static Quantum GetPixelGreen(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
char * glyphs
Definition: type.h:70
Definition: type.h:49
MagickExport MagickBooleanType static void * AcquireCriticalMemory(const size_t size)
char * format
Definition: type.h:70
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1058
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1397
MagickExport MagickBooleanType IsPathAccessible(const char *path)
Definition: utility.c:1466
size_t signature
Definition: image.h:354
size_t columns
Definition: image.h:172
ssize_t x
Definition: geometry.h:133
size_t height
Definition: geometry.h:129
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:742
MagickExport void * ImageToHBITMAP(Image *, ExceptionInfo *)
static size_t GetPixelChannels(const Image *magick_restrict image)
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1409
char filename[MagickPathExtent]
Definition: image.h:319
#define GetMagickModule()
Definition: log.h:28
#define ThrowImageException(severity, tag)
MagickExport void GetNextToken(const char *start, const char **end, const size_t extent, char *token)
Definition: token.c:171
unsigned short Quantum
Definition: magick-type.h:82
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
Definition: colorspace.c:1081
MagickExport char * DestroyString(char *string)
Definition: string.c:810
MagickExport MagickBooleanType NTIsMagickConflict(const char *)
#define CropImageTag
char * encoding
Definition: type.h:70
size_t signature
Definition: type.h:80
#define MagickExport
StyleType style
Definition: type.h:61
ssize_t y
Definition: geometry.h:133
static Quantum GetPixelBlue(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport char * ConstantString(const char *source)
Definition: string.c:687
char * name
Definition: type.h:55
ColorspaceType colorspace
Definition: image.h:157
MagickBooleanType debug
Definition: image.h:334