Windows Vista Forums

Re: WinFX CODECs Decoder
  1. #1


    Pablo Fernicola [MS] Guest

    Re: WinFX CODECs Decoder

    Trying to move this to the Avalon newsgroup, so that other folks that are
    working with WPF's Imaging Component get to see this thread as well.

    -Pablo



    "terry" <tjh42@mybluelight.com> wrote in message
    news:1141059834.167339.312490@z34g2000cwc.googlegroups.com...
    > Daniel:
    >
    > Thanks for the response. Digitally signing my decoder solves this
    > problem. Now I can call CreateDecoderFromFilename() and get a
    > reference to my custom decoder. I can also correctly get pixel data
    > calling the CopyPixels methd.
    >
    > But I'm having a second problem. When I try use my decoder to load a
    > custom image in a XAML file, my decoder does not get loaded. (The
    > MyCustomImage.cmp is the image file that my custom decoder can load
    > when I call CreateDecoderFromFileName()).
    >
    >
    > <StackPanel xmlns="http://schemas.microsoft.com/winfx/avalon/2005">
    > <Button Width="200">
    > <Image Source="e:\images\MyCustomImage.cmp"/>
    > </Button>
    > </StackPanel>
    >
    > I get the following error:
    > Error at element 'Image' in markup file 'Page1.xaml' : The string
    > 'e:\images\MyCustomImage.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.
    >
    > Were you able to use your custom decoder to load an image in a XAML
    > file?
    > Any ideas?
    >
    > Thanks for you help.
    >
    > --Terry
    >
    >
    >
    > schlzber@t-online.de wrote:
    >> Ike Starnes wrote:
    >> > A lot...

    >>
    >> > Terry Hopkins

    >>
    >> Hi Trevor,
    >>
    >> I had the same problem when I tried to get my decoder loaded this way.
    >> I Asked Robert A. Wlodarczyk from MS about it and he told me what you
    >> have to do. The dll with your COM Server has to be digitally signed and
    >> also has to have full trust locally on your computer. You can use the
    >> test certificate that you get when you create a clickonce project in
    >> visual studio 2005.
    >> Hope this helps for you too,
    >>
    >> Daniel

    >




      My System SpecsSystem Spec

  2. #2


    Pablo Fernicola [MS] Guest

    Re: WinFX CODECs Decoder

    And for folks interested on WIC (WPF's Imaging Components), I highly
    recommend Robert's blog - http://blogs.msdn.com/rwlodarc/default.aspx

    Btw, would love to get feedback as to whether you are finding the more
    direct dialog through blogs and newsgroup useful (there is less overhead and
    we are able to turn material around and go into greater depth faster than in
    any previous MS products we released), along with the regular CTP releases.
    Hopefully you are please, but let us know what we can do better.

    Thanks,

    -Pablo

    "Pablo Fernicola [MS]" <pablo@fernicola.org> wrote in message
    news:%23YG988CPGHA.3732@TK2MSFTNGP10.phx.gbl...
    > Trying to move this to the Avalon newsgroup, so that other folks that are
    > working with WPF's Imaging Component get to see this thread as well.
    >
    > -Pablo
    >
    > "terry" <tjh42@mybluelight.com> wrote in message
    > news:1141059834.167339.312490@z34g2000cwc.googlegroups.com...
    >> Daniel:
    >>
    >> Thanks for the response. Digitally signing my decoder solves this
    >> problem. Now I can call CreateDecoderFromFilename() and get a
    >> reference to my custom decoder. I can also correctly get pixel data
    >> calling the CopyPixels methd.
    >>
    >> But I'm having a second problem. When I try use my decoder to load a
    >> custom image in a XAML file, my decoder does not get loaded. (The
    >> MyCustomImage.cmp is the image file that my custom decoder can load
    >> when I call CreateDecoderFromFileName()).
    >>
    >>
    >> <StackPanel xmlns="http://schemas.microsoft.com/winfx/avalon/2005">
    >> <Button Width="200">
    >> <Image Source="e:\images\MyCustomImage.cmp"/>
    >> </Button>
    >> </StackPanel>
    >>
    >> I get the following error:
    >> Error at element 'Image' in markup file 'Page1.xaml' : The string
    >> 'e:\images\MyCustomImage.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.
    >>
    >> Were you able to use your custom decoder to load an image in a XAML
    >> file?
    >> Any ideas?
    >>
    >> Thanks for you help.
    >>
    >> --Terry
    >>
    >>
    >>
    >> schlzber@t-online.de wrote:
    >>> Ike Starnes wrote:
    >>> > A lot...
    >>>
    >>> > Terry Hopkins
    >>>
    >>> Hi Trevor,
    >>>
    >>> I had the same problem when I tried to get my decoder loaded this way.
    >>> I Asked Robert A. Wlodarczyk from MS about it and he told me what you
    >>> have to do. The dll with your COM Server has to be digitally signed and
    >>> also has to have full trust locally on your computer. You can use the
    >>> test certificate that you get when you create a clickonce project in
    >>> visual studio 2005.
    >>> Hope this helps for you too,
    >>>
    >>> Daniel

    >>

    >
    >




      My System SpecsSystem Spec

  3. #3


    schlzber@t-online.de Guest

    Re: WinFX CODECs Decoder

    I had this problem too ;-)
    I think the solution is to implement a class that implements
    IWICBitmapDecoderInfo that repeats all the information that you already
    have to put into the registry. You have to provide this interface in
    the IWICBitmapDecoder::GetDecoderInfo function.


      My System SpecsSystem Spec

Re: WinFX CODECs Decoder problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD Decoder eric@balancestaff.com Vista General 5 07 Apr 2007
DVD Decoder Eric Vista General 4 20 Mar 2007
DVD decoder Paul Vista installation & setup 1 11 Dec 2006
DVD decoder Paul Vista General 8 06 Dec 2006
DVD decoder Paul Vista hardware & devices 2 06 Dec 2006