18 #ifndef MAGICKCORE_CONSTITUTE_PRIVATE_H
19 #define MAGICKCORE_CONSTITUTE_PRIVATE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #include "MagickCore/constitute.h"
26 #include "MagickCore/exception.h"
27 #include "MagickCore/log.h"
28 #include "MagickCore/magick.h"
29 #include "MagickCore/magick-private.h"
30 #include "MagickCore/utility.h"
36 magic[MagickPathExtent];
38 (void) GetPathComponent(image_info->filename,MagickPath,magic);
41 const MagickInfo *magick_info = GetMagickInfo(magic,exception);
42 if ((magick_info != (
const MagickInfo *) NULL) &&
43 (GetMagickExplicitAllowed(magick_info) != MagickFalse))
44 return(ReadImage(image_info,exception));
47 (void) ThrowMagickException(exception,GetMagickModule(),ImageError,
48 "ExplicitCoderNotAllowed",
"`%s'",image_info->filename);
49 return((
Image *) NULL);
52 if (IsPathAccessible(image_info->filename) == MagickFalse)
54 (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
55 "UnableToOpenFile",
"`%s'",image_info->filename);
56 return((
Image *) NULL);
58 return(ReadImage(image_info,exception));
61 #if defined(__cplusplus) || defined(c_plusplus)