Page 1 of 1

Using Convert directly with HTTPS

Posted: 2011-03-18T07:43:26-07:00
by jimmacka
I'm trying to use Convert to directly access an image on the internet, then convert it and save it locally. This seems to work fine:
convert http://mywebsite.com/welcome.png -resize 150x150 c:\images\c-07352-01.png

But if I use HTTPS, it does not work:
convert https://mywebsite.com/welcome.png -resize 150x150 c:\images\c-07352-01.png
Magick: no decode delegate for this image format `//mywebsite.com/welcome.png' @ error/constitute.c/ReadImage/532.
Magick: missing an image filename `c:\images\c-07352-01.png' @ error/convert.c/ConvertImageCommand/2953.

Is my installation missing something that would allow a SSL connection?

Re: Using Convert directly with HTTPS

Posted: 2011-03-18T08:40:37-07:00
by magick
Your command works under Linux and Cygwin under Windows with the curl delegate program. ImageMagick does not have direct support for the HTTPS protocol so it relies on an external delegate program. Is there a Windows command-line utility that you can use to download from HTTPS? If so we might be able to configure it in delegates.xml to support HTTPS directly under Windows.

Re: Using Convert directly with HTTPS

Posted: 2011-03-27T06:39:15-07:00
by Silvertiger
if you have no firewall restrictions or issues, the following works for me:
(requires imageMagick and imagick for PHP)

Code: Select all

      $file_to_adjust = "https://www.myfile.com/filename.jpg";
      $handle = fopen($file_to_adjust, 'rb');
      $img = new Imagick();
      $img->readImageFile($handle);
      $img->thumbnailImage( 100, null );
      $img->writeImage('save_folder/save_filename.jpg";
the fopen() works around directly accessing the file via the http/https protocol.