protected override bool ProcessDecoder(MainForm form, IWICBitmapDecoder decoder, DataEntry[] de, object tag) { IWICBitmapDecoderInfo info = decoder.GetDecoderInfo(); try { info.GetCLSID(out var clsid); if (clsid != Parent.Clsid) { form.Add(this, Resources.IncorrectDecoderPickedUp, de, new DataEntry(Resources.Expected, Parent.Clsid), new DataEntry(Resources.Actual, clsid)); } else { Tag t = (Tag)tag; if (!t.SupportsMultiframe && decoder.GetFrameCount() > 1) { form.Add(this, Resources.DecoderDoesNotMultiframe, de, new DataEntry(Resources.FrameCount, decoder.GetFrameCount())); } } } finally { info.ReleaseComObject(); } return(true); }
protected override bool ProcessDecoder(MainForm form, IWICBitmapDecoder decoder, DataEntry[] de, object tag) { IWICBitmapDecoderInfo info = decoder.GetDecoderInfo(); try { Guid clsid; info.GetCLSID(out clsid); if (clsid != Parent.Clsid) { form.Add(this, Resources.IncorrectDecoderPickedUp, de, new DataEntry(Resources.Expected, Parent.Clsid), new DataEntry(Resources.Actual, clsid)); } else { Tag t = (Tag)tag; if (!t.SupportsMultiframe && decoder.GetFrameCount() > 1) { form.Add(this, Resources.DecoderDoesNotMultiframe, de, new DataEntry(Resources.FrameCount, decoder.GetFrameCount())); } } } finally { info.ReleaseComObject(); } return true; }