Display a image

Discussion in 'Skins and Design' started by celesta, August 30, 2011.

  1. celesta

    celesta Portal Member

    Joined:
    February 7, 2011
    Messages:
    46
    Likes Received:
    2
    Ratings:
    +2 / 0
    How to simple display a image from png file in xaml (path problem) ?



    In my screen I have this:
    <Image Width="128" Height="128" Stretch="Fill" Source="cover.png"/>

    cover.png is on Myplugin\Skin\default\images\cover.png

    I have no error, no warning, ... but the picture don't show
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Did you also try:
    Source="images\cover.png" ?
     
    • Like Like x 1
  4. celesta

    celesta Portal Member

    Joined:
    February 7, 2011
    Messages:
    46
    Likes Received:
    2
    Ratings:
    +2 / 0
    Ok it work.
    For source you can use only file name.

    My problem was that my png is a border and the center is transparency.
    When I define a width and height smaller, the image isn't resize but only crop.

    Thx
     
  5. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,994
    Likes Received:
    4,744
    Ratings:
    +6,789 / 11
    Home Country:
    Germany Germany
    Show System Specs
    • Like Like x 1
  6. celesta

    celesta Portal Member

    Joined:
    February 7, 2011
    Messages:
    46
    Likes Received:
    2
    Ratings:
    +2 / 0
    It's work! First post edited.

    Thx.
     
  7. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    It would also be a better idea to draw a border using the <Border> element. It's vector based and has no scaling issues and allows rounded corners.
     
  8. celesta

    celesta Portal Member

    Joined:
    February 7, 2011
    Messages:
    46
    Likes Received:
    2
    Ratings:
    +2 / 0
    Of course, but I used for testing the png from aoen stark (xbmc skin) wich has a png with border, shadow to the border and glass effect
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!