Page 1 of 1

IM is not identifying ICO files without suffix

Posted: 2016-07-16T02:00:10-07:00
by imname
IM is not identifying ICO files without *.ico suffix. Therefore, all commands are returning the same error:

identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/508.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/508.

Whereas, all other extensions are identified properly without suffix or even with the incorrect one.

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-16T05:17:35-07:00
by magick
Add -debug module to your command-line. Does the output give you insight into the problem? We tried converting an ICO image and it works for us (ImageMagick 7.0.2-3).

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-16T05:42:02-07:00
by imname

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<log>
  <event>2016-07-16T15:39:28+03:00 0:00.003 0.016u 7.0.2 Configure identify[6632]: utility.c/ExpandFilenames/943/Configure
  Command line: identify {-debug} {All} {google}</event>
  <event>2016-07-16T15:39:28+03:00 0:00.004 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.004 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.004 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.004 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.004 0.016u 7.0.2 Configure identify[6632]: configure.c/GetConfigureOptions/682/Configure
  Searching for configure file: "I:\Soft\ImageMagick\magic.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.005 0.016u 7.0.2 Configure identify[6632]: configure.c/GetConfigureOptions/682/Configure
  Searching for configure file: "C:\Users\username\AppData\Local\ImageMagick\magic.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.005 0.016u 7.0.2 Configure identify[6632]: magic.c/LoadMagicCache/849/Configure
  Loading magic configure file "I:\Soft\ImageMagick\magic.xml" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.006 0.016u 7.0.2 Policy identify[6632]: policy.c/IsRightsAuthorized/577/Policy
  Domain: Path; rights=Read; pattern="google" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.006 0.016u 7.0.2 Blob identify[6632]: blob.c/OpenBlob/2587/Blob
    read 3 magic header bytes</event>
  <event>2016-07-16T15:39:28+03:00 0:00.006 0.016u 7.0.2 Policy identify[6632]: policy.c/IsRightsAuthorized/577/Policy
  Domain: Coder; rights=Read; pattern="" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.006 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: configure.c/GetConfigureOptions/682/Configure
  Searching for configure file: "I:\Soft\ImageMagick\delegates.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: configure.c/GetConfigureOptions/682/Configure
  Searching for configure file: "C:\Users\username\AppData\Local\ImageMagick\delegates.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.007 0.016u 7.0.2 Configure identify[6632]: delegate.c/LoadDelegateCache/2016/Configure
  Loading delegate configuration file "I:\Soft\ImageMagick\delegates.xml" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.008 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.009 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.009 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.009 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.010 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.010 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.011 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.011 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.011 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.012 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.012 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.012 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.012 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.013 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.013 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.013 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.013 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.014 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.014 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.014 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTLocateGhostscript/1178/Configure
  Ghostscript ((null)) version 0.00</event>
  <event>2016-07-16T15:39:28+03:00 0:00.015 0.016u 7.0.2 Policy identify[6632]: policy.c/IsRightsAuthorized/577/Policy
  Domain: Path; rights=Read; pattern="google" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.016 0.016u 7.0.2 Blob identify[6632]: blob.c/OpenBlob/2587/Blob
    read 3 magic header bytes</event>
  <event>2016-07-16T15:39:28+03:00 0:00.016 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.016 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.016 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.016 0.016u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.017 0.031u 7.0.2 Locale identify[6632]: locale.c/GetLocaleOptions/829/Locale
  Searching for locale file: "I:\Soft\ImageMagick\locale.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.017 0.031u 7.0.2 Locale identify[6632]: locale.c/GetLocaleOptions/829/Locale
  Searching for locale file: "C:\Users\username\AppData\Local\ImageMagick\locale.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.017 0.031u 7.0.2 Configure identify[6632]: locale.c/LoadLocaleCache/1183/Configure
  Loading locale configure file "I:\Soft\ImageMagick\locale.xml" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.018 0.031u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.018 0.031u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.019 0.031u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/1992/Configure
  SOFTWARE\ImageMagick\7.0.2\Q:16</event>
  <event>2016-07-16T15:39:28+03:00 0:00.019 0.031u 7.0.2 Configure identify[6632]: nt-base.c/NTRegistryKeyLookup/2013/Configure
  ConfigurePath</event>
  <event>2016-07-16T15:39:28+03:00 0:00.019 0.031u 7.0.2 Locale identify[6632]: locale.c/GetLocaleOptions/829/Locale
  Searching for locale file: "I:\Soft\ImageMagick\english.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.019 0.031u 7.0.2 Locale identify[6632]: locale.c/GetLocaleOptions/829/Locale
  Searching for locale file: "C:\Users\username\AppData\Local\ImageMagick\english.xml"</event>
  <event>2016-07-16T15:39:28+03:00 0:00.020 0.031u 7.0.2 Configure identify[6632]: locale.c/LoadLocaleCache/1183/Configure
  Loading locale configure file "I:\Soft\ImageMagick\english.xml" ...</event>
  <event>2016-07-16T15:39:28+03:00 0:00.027 0.031u 7.0.2 Exception identify[6632]: constitute.c/ReadImage/508/Exception
  no decode delegate for this image format `'</event>
  <event>2016-07-16T15:39:28+03:00 0:00.027 0.031u 7.0.2 Cache identify[6632]: cache.c/DestroyPixelCache/940/Cache
  destroy </event>
</log>

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-16T05:43:03-07:00
by imname
Same file with added suffix:
magick identify google.ico
google.ico[0] ICO 16x16 16x16+0+0 32-bit sRGB 5.43KB 0.000u 0:00.000
google.ico[1] ICO 32x32 32x32+0+0 32-bit sRGB 5.43KB 0.000u 0:00.006

I used this file:
https://www.google.com/images/branding/ ... g_lodp.ico

UPD: Sorry I forget to mention that I'm using ImageMagick 7.0.2-0 , not 7.0.2-3. Is it critical in my case?

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-16T10:09:10-07:00
by imname
My English is not perfect, so just to clarify, here are steps to reproduce the error:

1) Take the googleg_lodp.ico file
2) Rename it to googleg_lodp (without .ico suffix)
3) Execute the command: magick identify googleg_lodp

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-17T05:09:38-07:00
by magick
Try this filename: ico:googleg_lodp.

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-17T06:19:38-07:00
by imname
It works, thank you.
However, my objectives include automatic usage of "convert" command on files with random formats and some of them do not have suffixes. ImageMagic works perfectly for my purpose, except for the case with ICO files. It would be great if you add the same identification support for ICO, as for other formats, in future versions of IM.

Nevertheless, your product is excellent! Thank you.

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-18T05:41:40-07:00
by glennrp
The "magic number" for an ICO file is hex 0001. That's not much to go by. Lots of files could begin with those four bytes.

Re: IM is not identifying ICO files without suffix

Posted: 2016-07-18T07:07:48-07:00
by imname
I'm not a programmer but I would offer the following logic to solve this:

0. Processing file without suffix
1. Tying to identify using all available formats, except ICO
2. If file is not recognized, then trying to put ico: at the begining of the filename (as suggested by magick)
3. If successful, we get the desired result.
4. If not, then return error message.