Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Locked
fogrunner
Posts: 5
Joined: 2020-03-16T07:02:25-07:00
Authentication code: 1152

Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by fogrunner »

Hello.

I have just started to use this library and used this on MFC Application.

At first, i did installing Windows Binary Release which is served on official website.

It works well. However, i realized that Debug build is not offering.

Thus, i had to build it by myself.

I had downloaded ImageMaick-window.7z from official repository and built it with 64bit deploy, HDRI,2015, 16Q etc options.

The compiling had been done without any errors.

However, i had faced below error when i had tried to load images.

Code: Select all

+NoDecodeDelegateForThisImageFormat `GIF' @ error/constitute.c/ReadImage/562"	const char *
All formats (JPEG, BMP, PNG ..) are not working with the same exception like above.

I can not guess any reason why it is happening.

Does someone have any idea?

Please give me piece of advice.

spec.
- Windows 10
- VC 2015, MFC
- ImageMagick-7.0.10-1

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by snibgo »

I suspect you haven't installed required libraries: libpng, etc. I build on Windows with Gnu tools, from the page https://www.imagemagick.org/script/inst ... hp#windows link to ImageMagick-windows.zip , and that zip contains the common libraries.
snibgo's IM pages: im.snibgo.com

fogrunner
Posts: 5
Joined: 2020-03-16T07:02:25-07:00
Authentication code: 1152

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by fogrunner »

Thank your for relying.

I am still confusing. Because, it worked well when i used Official Release Library on the same environment.

I have to distribute this application to my clients. Do the clients have to install libpng and etc also?

fogrunner
Posts: 5
Joined: 2020-03-16T07:02:25-07:00
Authentication code: 1152

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by fogrunner »

I have complied it as like below.

1. extract imageMaagick-windows.7z
2. complied configure.exe from configure.sln
3. generated VisualDynamicMT.sln from configure.exe
4. compiled all projects on VisualDynamicMT.sln
5. linked CORE_DB_Magick++_.lib which is built from above (4).
6. used the CORE_DB_Magick++_.dll and other dlls that they are generated from above(4).

Linking and running is well. But, the exception is still happened.
There is no issues when i linked Official Release Library instead.

So, i might have done some mistakes (maybe 4 or 3 step).
But, i do not have any ideas what did i do wrong.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by snibgo »

I don't use your build methods, so can't advise on them.

What does "magick -version" say about your build?
snibgo's IM pages: im.snibgo.com

fogrunner
Posts: 5
Joined: 2020-03-16T07:02:25-07:00
Authentication code: 1152

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by fogrunner »

I have figured out the reason of the exception.

The main reason is that i did not copy IM_MOD_*.dll to application folder.
I have just copied CORE_*.dll files. Because, Official Release Build is offering only those.
Beside, there was no dependency issues when the application is started. (i realized that IM_MOD_*.dll might be loaded dynamically)

After copied the dlls, the exception is gone.

However, i am still confusing. Why Official Release Build is running well without IM_MOD_*.dll?
It is such a magic. Even the files (CORE_*.dll) size are also almost the same between official stuff and my own build. (even my own build is little bit bigger)

Does someone let me know why?

fogrunner
Posts: 5
Joined: 2020-03-16T07:02:25-07:00
Authentication code: 1152

Re: Exception : NoDecodeDelegateForThisImageFormat (MFC application)

Post by fogrunner »

snibgo wrote:
2020-03-16T22:54:40-07:00
I don't use your build methods, so can't advise on them.

What does "magick -version" say about your build?
Version: ImageMagick 7.0.10-1 Q16 x64 2020-03-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 190024215
Features: Debug Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib

Locked