WIC CreateDecoderFromStream returning 0x88982F50 post server migration

3

I have a thumbnail generation routine that I created using WIC for a .NET app. It has been working fine for the past year, but we just migrated to a new server.

Old Server was W2k8 R2 Enterprise SP1 New Server is W2k8 Standard SP1

Here's the code that is failing

    Public Sub New(ByVal PictureData As Byte())
        Me.WICFactory = New WICImagingFactory()

        Dim InputStream As IWICStream = WICFactory.CreateStream()
        InputStream.InitializeFromMemory(PictureData, PictureData.Length)

        InputDecoder = WICFactory.CreateDecoderFromStream(InputStream, Nothing, WICDecodeOptions.WICDecodeMetadataCacheOnDemand)

        '^===== This line throws the HRESULT 0x88982F50

I have checked and the picture data is valid data. The exact same picture works fine if I run the code on the old server.

.net
vb.net
windows-server-2008
windows-server-2008-r2
wic

3 Answers

1

That's WINCODEC_ERR_COMPONENTNOTFOUND. It means WIC was not able to find a Decoder class that is registered for the type of file in your stream.

Here is what I would suggest:

On the old server where it works, print out the value of InputDecoder.GetDecoderInfo().GetCLSID(), and maybe also GetAuthor/GetFriendlyName. If it's one of the builtin CLSID's listed here, then the WIC on your new machine is likely broken. Otherwise, you will need to figure out where the decoder you're using on the old machine came from, and install it to the new machine.

Or just look around for a decoder for whatever type of file you have.

answered on Stack Overflow May 31, 2012 by Esme Povirk
1

The problem was that I was running Server 2008 SP1. As described in this question, you need to apply a platform update to Server 2008 (post SP2) before WIC is available. (It is available natively in R2)

answered on Stack Overflow Jun 4, 2012 by just.another.programmer • edited May 23, 2017 by Community
0

Windows of Previous version Windows Vista SP2 /Server 2008 SP2 + KB971644. does not have GUID_ContainerFormatWmp so it fails to detect image format automatically.

we shoud use the following code.

CoCreateInstance(CLSID_WICWmpDecoder,NULL, CLSCTX_INPROC_SERVER,IID_IWICBitmapDecoder,(LPVOID*)&inputDecoder); 
answered on Stack Overflow Sep 12, 2019 by Blog Windows2000

User contributions licensed under CC BY-SA 3.0