Unable to open file on specific URL

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
kicks77
Posts: 2
Joined: 2015-04-23T03:14:04-07:00
Authentication code: 6789

Unable to open file on specific URL

Post by kicks77 »

I have the following image:

http://www.tapcoffee.co.uk/images/bg1.jpg

I am trying to process it with ImageMagick, but receiving an error

Code: Select all

unable to open file /tmp/magick/xxxx
I have tried uploading to imgur and that also fails, what is wrong with this specific image?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Unable to open file on specific URL

Post by snibgo »

bg1.jpg converts for me with no problem, IM v6.9.1-0. What version of IM are you using? What is the exact command?
snibgo's IM pages: im.snibgo.com
kicks77
Posts: 2
Joined: 2015-04-23T03:14:04-07:00
Authentication code: 6789

Re: Unable to open file on specific URL

Post by kicks77 »

Ive tested with latest and im having issues (PHP). Ive done some investigating and found that the URL is sending Content-Type: text/html; charset=utf-8, is it possible to tell ImageMagick that it is an image?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Unable to open file on specific URL

Post by Bonzo »

Works OK for me using php but it is very slow.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Unable to open file on specific URL

Post by snibgo »

kicks77 wrote:Ive tested with latest and im having issues (PHP). Ive done some investigating and found that the URL is sending Content-Type: text/html; charset=utf-8, is it possible to tell ImageMagick that it is an image?
From this, I guess your command was something like:

Code: Select all

convert http://www.tapcoffee.co.uk/images/bg1.jpg c.png
No, you can't tell IM that it is an image. Because it isn't. If you wget that address, and cat (Unix) or type (Windows) the file, you will see something like this:

Code: Select all

<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. If you think this is an error, please contact the webmaster. <br><br>Your support ID is: 15891905563042779399</body></html>
snibgo's IM pages: im.snibgo.com
Post Reply