]> granicus.if.org Git - imagemagick/commitdiff
https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36581
authorCristy <urban-warrior@imagemagick.org>
Sat, 24 Aug 2019 20:50:22 +0000 (16:50 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 24 Aug 2019 20:50:44 +0000 (16:50 -0400)
ChangeLog
coders/url.c
config/delegates.xml.in

index c5ddc626cf10ff84dd4db020d9acb4bc676eaddf..476282113e2d5c1a5d1170f9708aa6d375453e86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-24  7.0.8-63 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.8-63, GIT revision 16...
+
+2019-08-24  7.0.8-62 Cristy  <quetzlzacatenango@image...>
+  * Properly identify the image format of an HTTPS image.
+
 2019-08-23  7.0.8-62 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.8-62, GIT revision 16061:7525595:20190823.
 
index 22414c2303365e89258134065c9d6764ab53048a..e491dd5c39e5d03201ef791f8e01b3330b3d8ff9 100644 (file)
@@ -149,6 +149,48 @@ static Image *ReadURLImage(const ImageInfo *image_info,ExceptionInfo *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) FormatLocaleString(read_info->filename,MagickPathExtent,
+            "%s.dat",read_info->unique);
+          *read_info->magick='\0';
+          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);
+      image=DestroyImage(image);
+      return(images);
+    }
+#endif
   if (LocaleCompare(read_info->magick,"file") == 0)
     {
       (void) CopyMagickString(read_info->filename,image_info->filename+2,
@@ -287,10 +329,7 @@ ModuleExport size_t RegisterURLImage(void)
   entry->format_type=ImplicitFormatType;
   (void) RegisterMagickInfo(entry);
   entry=AcquireMagickInfo("URL","HTTPS","Uniform Resource Locator (https://)");
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
-    !defined(__MINGW32__)
   entry->decoder=(DecodeImageHandler *) ReadURLImage;
-#endif
   entry->format_type=ImplicitFormatType;
   (void) RegisterMagickInfo(entry);
   entry=AcquireMagickInfo("URL","FTP","Uniform Resource Locator (ftp://)");
index 688adf78ef091d224c15dfb05fd55f2371ce87dc..c12eeca87336047a7ae86b99d6a6f2b4b2c0f4bb 100644 (file)
@@ -64,7 +64,7 @@
   <delegate decode="browse" stealth="True" spawn="True" command="&quot;@BrowseDelegate@&quot; https://imagemagick.org/; @RMDelegate@ &quot;%i&quot;"/>
   <delegate decode="cdr" command="&quot;@UniconvertorDelegate@&quot; &quot;%i&quot; &quot;%o.svg&quot;; @MVDelegate@ &quot;%o.svg&quot; &quot;%o&quot;"/>
   <delegate decode="cgm" command="&quot;@UniconvertorDelegate@&quot; &quot;%i&quot; &quot;%o.svg&quot;; @MVDelegate@ &quot;%o.svg&quot; &quot;%o&quot;"/>
-  <delegate decode="https" command="&quot;@WWWDecodeDelegate@&quot; -s -k -L -o &quot;%o&quot; &quot;https:%M&quot;"/>
+  <delegate decode="https:decode" command="&quot;@WWWDecodeDelegate@&quot; -s -k -L -o &quot;%u.dat&quot; &quot;https:%M&quot;"/>
   <delegate decode="doc" command="&quot;@DOCDecodeDelegate@&quot; --convert-to pdf -outdir `dirname &quot;%i&quot;` &quot;%i&quot; 2&gt; &quot;%u&quot;; @MVDelegate@ &quot;%i.pdf&quot; &quot;%o&quot;"/>
   <delegate decode="docx" command="&quot;@DOCDecodeDelegate@&quot; --convert-to pdf -outdir `dirname &quot;%i&quot;` &quot;%i&quot; 2&gt; &quot;%u&quot;; @MVDelegate@ &quot;%i.pdf&quot; &quot;%o&quot;"/>
   <delegate decode="dng:decode" command="&quot;@DNGDecodeDelegate@&quot; --silent --create-id=also --out-type=png --out-depth=16 &quot;--output=%u.png&quot; &quot;%i&quot;"/>