% March 2000 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
#include "MagickCore/utility.h"
#if defined(MAGICKCORE_XML_DELEGATE)
# if defined(MAGICKCORE_WINDOWS_SUPPORT)
-# if defined(__MINGW32__)
+# if defined(__MINGW32__) || defined(__MINGW64__)
# define _MSC_VER
# else
# include <win32config.h>
}
#endif
(void) fclose(file);
- *read_info->magick='\0';
+ {
+ ExceptionInfo
+ *sans;
+
+ ImageInfo
+ *clone_info;
+
+ /*
+ Guess image format from URL.
+ */
+ clone_info=CloneImageInfo(image_info);
+ sans=AcquireExceptionInfo();
+ (void) SetImageInfo(clone_info,0,sans);
+ (void) CopyMagickString(read_info->magick,clone_info->magick,MaxTextExtent);
+ clone_info=DestroyImageInfo(clone_info);
+ sans=DestroyExceptionInfo(sans);
+ }
image=ReadImage(read_info,exception);
if (unique_file != -1)
(void) RelinquishUniqueFileResource(read_info->filename);
if (image != (Image *) NULL)
GetPathComponent(image_info->filename,TailPath,image->filename);
else
- (void) ThrowMagickException(exception,GetMagickModule(),CoderError,
- "NoDataReturned","`%s'",filename);
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),CoderError,
+ "NoDataReturned","`%s'",filename);
+ return((Image *) NULL);
+ }
return(GetFirstImageInList(image));
}
\f