Signing CODEC binary
There have been quite a few folks developing CODECs that work with WindowsCodecs CODEC extensibility. Since the Dec. CTP (maybe sooner), one popular question that has come up is that when trying to use WICExplorer to load up the image, you get a component not found error. The reason behind this is that there is a check to see whether the binary that has the CODEC is signed by a certificate that's installed on the system. Once you sign your binary, then everything should work fine.
Comments
- Anonymous
February 27, 2006
Robert:
I posted a question in the newsgroup WinFX CODECs Decoder about developing custom codecs. You replied that I needed to digitally sign my codec with a trusted certificate.
This works great with CreateDecoderFromFilename(), but if I try to use my codec to display a custom image format in a XAML file, it does not work.
<StackPanel xmlns="http://schemas.microsoft.com/winfx/avalon/2005">
<Button Width="200">
<Image Source="e:imagesMyCustomImage.cmp"/>
</Button>
</StackPanel>
I get the following error:
Error at element 'Image' in markup file 'Page1.xaml' : The string
'e:imagesMyCustomImage.cmp' could not be set on the 'Source' property
which is of type 'ImageSource'. Please see the sdk documentation for
the Source property and the ImageSource class for an explanation of
allowable values.
The snippet above works correctly if I replace the MyCustomImage.cmp
with valid PNG image, or any other image format that WinFX supports
natively.
I also tried this with the AIT codec and had the same problem.
I created an AIT image with your WICExplorer.exe app by loading a BMP and then saving in the AIT format. I had to change the
Val("CLSID{EEC50239-14BB-4F70-AD2A-B7126219A6DC}\1033","FriendlyName", "Test AIT Encoder");
to
Val("CLSID{EEC50239-14BB-4F70-AD2A-B7126219A6DC}","FriendlyName", "Test AIT Encoder");
in TestCodecsRegistryManager.h to get the Ait Decoder to display in the "Encoder Selection" dialog.
Were you able to use your custom decoder to load an image in a XAML
file?
Any ideas?
Thanks for you help.
--Terry Hopkins - Anonymous
February 27, 2006
Robert:
I posted a question in the newsgroup WinFX CODECs Decoder about developing custom codecs. You replied that I needed to digitally sign my codec with a trusted certificate.
This works great with CreateDecoderFromFilename(), but if I try to use my codec to display a custom image format in a XAML file, it does not work.
<StackPanel xmlns="http://schemas.microsoft.com/winfx/avalon/2005">
<Button Width="200">
<Image Source="e:imagesMyCustomImage.cmp"/>
</Button>
</StackPanel>
I get the following error:
Error at element 'Image' in markup file 'Page1.xaml' : The string
'e:imagesMyCustomImage.cmp' could not be set on the 'Source' property
which is of type 'ImageSource'. Please see the sdk documentation for
the Source property and the ImageSource class for an explanation of
allowable values.
The snippet above works correctly if I replace the MyCustomImage.cmp
with valid PNG image, or any other image format that WinFX supports
natively.
I also tried this with the AIT codec and had the same problem.
I created an AIT image with your WICExplorer.exe app by loading a BMP and then saving in the AIT format. I had to change the
Val("CLSID{EEC50239-14BB-4F70-AD2A-B7126219A6DC}\1033","FriendlyName", "Test AIT Encoder");
to
Val("CLSID{EEC50239-14BB-4F70-AD2A-B7126219A6DC}","FriendlyName", "Test AIT Encoder");
in TestCodecsRegistryManager.h to get the Ait Decoder to display in the "Encoder Selection" dialog.
Were you able to use your custom decoder to load an image in a XAML
file?
Any ideas?
Thanks for you help.
--Terry Hopkins - Anonymous
March 08, 2006
Since i have signed my dll the encoder works. But we use a 'compound document file' for our image. We have no pattern in the file but we have a root CLSID. Is there a chance to load the decoder only by file extension or root CLSID? - Anonymous
March 10, 2006
A while ago I posted a sample AIT CODEC and WICExplorer. I've (finally) updated these for the latest...