Identify ftp and spaces

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
daisybodo
Posts: 3
Joined: 2018-08-31T03:07:53-07:00
Authentication code: 1152

Identify ftp and spaces

Post 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.
slm
Posts: 1
Joined: 2018-09-01T06:54:53-07:00
Authentication code: 1152

Re: Identify ftp and spaces

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify ftp and spaces

Post 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.
snibgo's IM pages: im.snibgo.com
daisybodo
Posts: 3
Joined: 2018-08-31T03:07:53-07:00
Authentication code: 1152

Re: Identify ftp and spaces

Post 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.
Last edited by daisybodo on 2018-09-03T05:41:24-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify ftp and spaces

Post by snibgo »

I suggest you try an upgrade.
snibgo's IM pages: im.snibgo.com
daisybodo
Posts: 3
Joined: 2018-08-31T03:07:53-07:00
Authentication code: 1152

Re: Identify ftp and spaces

Post 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...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Identify ftp and spaces

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify ftp and spaces

Post 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"
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Identify ftp and spaces

Post 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.
Post Reply