*file;
Image
- *image;
+ *image,
+ *images,
+ *next;
ImageInfo
*read_info;
int
unique_file;
+ images=(Image *) NULL;
+ image=AcquireImage(image_info,exception);
read_info=CloneImageInfo(image_info);
SetImageInfoBlob(read_info,(void *) NULL,0);
#if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__)
if (LocaleCompare(read_info->magick,"https") == 0)
{
- Image
- *image,
- *images,
- *next;
-
MagickBooleanType
status;
/*
Leverage delegate to read HTTPS link.
*/
- images=(Image *) NULL;
- image=AcquireImage(image_info,exception);
status=InvokeDelegate(read_info,image,"https:decode",(char *) NULL,
exception);
if (status != MagickFalse)
(void) CopyMagickString(read_info->filename,image_info->filename+2,
MagickPathExtent);
*read_info->magick='\0';
- image=ReadImage(read_info,exception);
+ images=ReadImage(read_info,exception);
read_info=DestroyImageInfo(read_info);
- return(GetFirstImageInList(image));
+ image=DestroyImage(image);
+ return(GetFirstImageInList(images));
}
file=(FILE *) NULL;
unique_file=AcquireUniqueFileResource(read_info->filename);
LocaleLower(filename);
(void) ConcatenateMagickString(filename,image_info->filename,
MagickPathExtent);
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
- !defined(__MINGW32__)
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
(void) fclose(file);
if (URLDownloadToFile(NULL,filename,read_info->filename,0,NULL) != S_OK)
{
ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
filename);
(void) RelinquishUniqueFileResource(read_info->filename);
+ (void) CopyMagickString(read_info->filename,image->filename,
+ MagickPathExtent);
+ (void) SetImageInfo(read_info,1,exception);
+ if (images != (Image *) NULL)
+ for (next=images; next != (Image *) NULL; next=next->next)
+ {
+ (void) CopyMagickString(next->filename,image->filename,
+ MagickPathExtent);
+ (void) CopyMagickString(next->magick,read_info->magick,
+ MagickPathExtent);
+ }
read_info=DestroyImageInfo(read_info);
return((Image *) NULL);
}
(void) fclose(file);
#endif
*read_info->magick='\0';
- image=ReadImage(read_info,exception);
+ images=ReadImage(read_info,exception);
(void) RelinquishUniqueFileResource(read_info->filename);
+ (void) CopyMagickString(read_info->filename,image->filename,MagickPathExtent);
+ (void) SetImageInfo(read_info,1,exception);
+ if (images != (Image *) NULL)
+ for (next=images; next != (Image *) NULL; next=next->next)
+ {
+ (void) CopyMagickString(next->filename,image->filename,MagickPathExtent);
+ (void) CopyMagickString(next->magick,read_info->magick,MagickPathExtent);
+ }
read_info=DestroyImageInfo(read_info);
- if (image != (Image *) NULL)
- GetPathComponent(image_info->filename,TailPath,image->filename);
+ image=DestroyImage(image);
+ if (images != (Image *) NULL)
+ GetPathComponent(image_info->filename,TailPath,images->filename);
else
{
(void) ThrowMagickException(exception,GetMagickModule(),CoderError,
"NoDataReturned","`%s'",filename);
return((Image *) NULL);
}
- return(GetFirstImageInList(image));
+ return(GetFirstImageInList(images));
}
\f
/*