dlemstra / Magick.NET

The .NET library for ImageMagick
Apache License 2.0
3.46k stars 416 forks source link

Missing dll while using TIFF images. #371

Closed Romasz closed 5 years ago

Romasz commented 5 years ago

Prerequisites

Description

While using tiff image as a source of MagickImage we can see in debug output that of the dlls seem to be missing:

Error: ImageCoreBasedDecoder static init failed: System.DllNotFoundException: Unable to load DLL 'WIC.ImgCoreDll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at ImgCore.ImgCoreDll.IC_StaticInit() at P1.C1.Common.ImageCore.ImageCore.StaticInit(Int32 argHeapSize) at P1.COPE.Core.COPEEnvironment.Initialize(String colorProfileRootPath, String imgCoreLogFile, String copeLogFile, Int32 heapSize) at P1.WICCODEC.CODEC.ImageCoreBasedDecoder.StaticInitialization() at P1.WICCODEC.CODEC.ImageCoreBasedDecoder..cctor()`

The code is simple:

using (MagickImage image = new MagickImage(source))
    return image.ToByteArray();

Not sure how important is this, hence everything works fine. Just this noise in the output with alerting 'Error'.

System Configuration

dlemstra commented 5 years ago

Your exception is complaining about not being able to load a library called WIC.ImgCoreDll.dll. This is not a Magick.NET library. It looks like you have a different problem?

Romasz commented 5 years ago

You are right. I debugged further and checked some more dependencies - this seem to be a problem on my side with one of the codecs. It appears after the byte array is returned.

Sorry for leaning out with this.

dlemstra commented 5 years ago

No problem and thanks for coming back and closing this issue 👍