18 #ifndef MAGICKCORE_CONSTITUTE_PRIVATE_H 19 #define MAGICKCORE_CONSTITUTE_PRIVATE_H 21 #if defined(__cplusplus) || defined(c_plusplus) 25 #include "magick/constitute.h" 26 #include "magick/exception.h" 27 #include "magick/log.h" 28 #include "magick/utility.h" 34 magic[MagickPathExtent];
39 (void) GetPathComponent(image_info->filename,MagickPath,magic);
42 (void) ThrowMagickException(exception, GetMagickModule(), OptionError,
43 "ExplicitCoderNotAllowed",
"`%s'",image_info->filename);
44 return((
Image *) NULL);
46 if (stat(image_info->filename,&file_info) != 0)
48 (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
49 "UnableToOpenFile",
"`%s'",image_info->filename);
50 return((
Image *) NULL);
52 if (S_ISREG(file_info.st_mode) == 0)
54 (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
55 "NotARegularFile",
"`%s'",image_info->filename);
56 return((
Image *) NULL);
58 return(ReadImage(image_info,exception));
61 #if defined(__cplusplus) || defined(c_plusplus)