How to determine the format of a file accessed via http?

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
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

How to determine the format of a file accessed via http?

Post by rmagick »

Is there any way to determine the real format of a file identified using http? For example,

Code: Select all

identify -verbose http://www.google.com/intl/en_ALL/images/logo.gif
says that the format is HTTP. Is there any way to determine that the file is actually a GIF file?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to determine the format of a file accessed via http?

Post by magick »

We have a patch in ImageMagick 6.3.9-0 Beta for the problem you reported. The patch will mirror world-wide within 24 hours.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: How to determine the format of a file accessed via http?

Post by rmagick »

And I didn't even realize it was a problem! Thanks! I'll pass this on to the RMagick user who asked me about it.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: How to determine the format of a file accessed via http?

Post by rmagick »

Am I missing something? I still get HTTP for the format.

Code: Select all

tim@linux:~$ identify -version  http://www.google.com/intl/en_ALL/images/logo.gif
Version: ImageMagick 6.3.9 02/25/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

http://www.google.com/intl/en_ALL/images/logo.gif=>/home/tim/tmp/magick-XXKyiJvA HTTP 276x110 276x110+0+0 PseudoClass 256c 8-bit 8.35742kb
tim@linux:~$ identify -verbose http://www.google.com/intl/en_ALL/images/logo.gif
Image: /home/tim/tmp/magick-XXCz6cV1
  Base filename: logo.gif
  Format: HTTP (Uniform Resource Locator (http://))
  Class: PseudoClass
  Geometry: 276x110+0+0
  Resolution: 72x72
  Print size: 3.83333x1.52778
  Units: Undefined
  Type: Palette
  Endianess: Undefined
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to determine the format of a file accessed via http?

Post by magick »

The problem is fixed in ImageMagick 6.3.9-1 Beta available sometime tomorrow.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: How to determine the format of a file accessed via http?

Post by rmagick »

Thanks!
Post Reply