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?
Using Convert directly with HTTPS
Re: Using Convert directly with HTTPS
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.
-
- Posts: 2
- Joined: 2011-03-27T06:24:27-07:00
- Authentication code: 8675308
Re: Using Convert directly with HTTPS
if you have no firewall restrictions or issues, the following works for me:
(requires imageMagick and imagick for PHP)
the fopen() works around directly accessing the file via the http/https protocol.
(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";