[solved] Plugin: ImageSourceExtensions (3 Viewers)

Brownard

Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    This plugin adds a new type of ImageSource to MediaPortal 2 which allows skinners to implement smooth transitions and delayed loading of images.
    The ImageSourceWrapper inherits from MultiImageSource so has all of its properties plus:
    • Delay: The amount of time in seconds to delay the loading of images, useful for avoiding loading lots of images when scrolling quickly
    • DelayInOut: Whether the delay should apply when transitioning to or from null
    • Source: The primary image source, can either be a path to an image or an ImageSource that has a Uri property (MultiImageSource or BitmapImageSource)
    • FallbackSource: The image source to use if the primary source cannot be loaded, can either be a path to an image or an ImageSource that has a Uri property (MultiImageSource or BitmapImageSource)
    Source: https://github.com/MediaPortal/MediaPortal-2/tree/PLUGIN_ImageSourceExtensions

    Installation: Extract the attached zip to the MP2 client plugin directory

    Example usage:
    XML:
    <Screen
        xmlns:ie="clr-namespace:ImageSourceExtensions;assembly=ImageSourceExtensions"
        >
    ...
    <Image x:Name="FanArtImageBackground" VerticalAlignment="Stretch" Stretch="UniformToFill" Grid.Row="0" Grid.Column="0">
        <Image.Source>
            <ie:ImageSourceWrapper Delay="0.5" DelayInOut="true" Transition="transitions\dissolve" TransitionDuration="0.5"
                            Source="{Binding Source={StaticResource FanArtBackgroundModel}, Path=ImageSource, Converter={StaticResource FanArtImageSourceConverter}, ConverterParameter=FanArt;1920;1080;False}"
                            FallbackSource="FallbackFanart.png" />
        </Image.Source>
    </Image>
     

    Attachments

    • ImageSourceExtensions.zip
      4.5 KB
    Last edited:

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Wow Brownard, you are a genius! (y):p:D It feels like beeing in a different world.
    All transitions are happening smoothly now. I think we have to bind the plugin, so it's installed ondefault!
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    A quick and dirty recording. Unfortunately I've no better software at the moment. And also I don't want to load tons of MB to here.
    You can see, that also the delay is working perfectly. Means, scrolling quickly makes the FanArts not being loaded and preventing performance issues.
     

    Attachments

    • test.avi
      41.4 MB

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    This definitely is a big improvement in user experience, great(y)
    Can't wait to see this "live" on my setup.
    BTW... Do I need to adjust my Theme too or is this done in the main BV skin?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Hi.
    This definitely is a big improvement in user experience, great(y)
    Can't wait to see this "live" on my setup.
    BTW... Do I need to adjust my Theme too or is this done in the main BV skin?
    You need to adjust your theme in default-background.xaml according to Brownards guide above.
     
    Last edited:

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Thanks. I've tried it in Image-background.xaml but this did not work. Now I know why...;)
     

    Users who are viewing this thread

    Top Bottom