Page 1 of 1

Identify ftp and spaces

Posted: 2018-08-31T03:11:47-07:00
by daisybodo
Hi,

Imagemagick provides "identify" tool, which works perfectly for what I need.
I use it on Ubuntu, with Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114

Here is how I use it : identify "ftp://SERVERNAME:PASSWORD@HOST/DIRECTORY/FILE.pdf"

But when the directory or file has got a space in his name, I've got an error as if it doesn't find the file. (only for a ftp file)

Any solution ? I've tried with "\", "\\", "%20" or "^" before spaces, but it doesn't solve this issue.

Re: Identify ftp and spaces

Posted: 2018-09-01T06:58:14-07:00
by slm
This question was also asked on stackoverflow here: https://stackoverflow.com/questions/521 ... 5#52128505. Please followup there with any resolutions as well so that any resolutions are recorded there as well.

Re: Identify ftp and spaces

Posted: 2018-09-01T07:24:45-07:00
by snibgo
It works fine for me with v6.9.9-50 and v7.0.7-28 on Windows 8.1, eg:

Code: Select all

magick identify "ftp://snibgo.com:password@ftp.snibgo.com/imforums/with space.jpg"

ftp://snibgo.com:password@ftp.snibgo.com/imforums/with space.jpg=>with space.jpg
 JPEG 70x46 70x46+0+0 8-bit sRGB 2649B 0.000u 0:00.077
Sorry, I don't use stackoverflow.

Re: Identify ftp and spaces

Posted: 2018-09-03T04:42:56-07:00
by daisybodo
Doesn't work for me :

Code: Select all

identify-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
identify-im6.q16: no data returned `ftp://snibgo.com:password@ftp.snibgo.com/imforums/with space.jpg' @ error/url.c/ReadURLImage/247.
Same with single quotes.

Re: Identify ftp and spaces

Posted: 2018-09-03T05:12:19-07:00
by snibgo
I suggest you try an upgrade.

Re: Identify ftp and spaces

Posted: 2018-09-03T05:40:43-07:00
by daisybodo

Code: Select all

identify --version
Version: ImageMagick 7.0.8-11 Q16 x86_64 2018-09-03 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): 
still doesn't work...

Re: Identify ftp and spaces

Posted: 2018-09-03T09:51:55-07:00
by fmw42
Try with http rather than ftp

This fails for me:

Code: Select all

identify "ftp://www.fmwconcepts.com/misc_tests/lena copy.jpg"
This fails for me:

Code: Select all

identify "ftp://www.fmwconcepts.com/misc_tests/lena%20copy.jpg"
This fails for me:

Code: Select all

identify "http://www.fmwconcepts.com/misc_tests/lena copy.jpg"
But this works:

Code: Select all

identify "http://www.fmwconcepts.com/misc_tests/lena%20copy.jpg"
On IM 6.9.10.11 Q16 Mac OSX

Re: Identify ftp and spaces

Posted: 2018-09-03T18:29:51-07:00
by snibgo
The domain fmwconcepts.com might not permit ftp access.

snibgo.com does allow ftp access, so the following all work for me:

Code: Select all

magick identify "ftp://snibgo.com:password@ftp.snibgo.com/imforums/with space.jpg"

magick identify "ftp://snibgo.com:password@ftp.snibgo.com/imforums/with%20space.jpg"

magick identify "http://snibgo.com/imforums/with%20space.jpg"

magick identify "http://snibgo.com/imforums/with space.jpg"

Re: Identify ftp and spaces

Posted: 2018-09-03T18:55:47-07:00
by fmw42
Note that in my comments above, http download failed with the space in the file name. So there may be some issues on Unix systems that are not problems on Windows.