[MyPictures] Bilder an Bildschirmgröße anpassen (Hack in Post12)? | Page 2

Discussion in 'Bilder' started by eclere, October 18, 2006.

  1. eclere

    eclere Portal Member

    Joined:
    August 31, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    DE
    Ratings:
    +0 / 0
    TV-Server Version: 1.0
    MediaPortal Version: RC2
    MediaPortal Skin: BlueTwo Wide
    Windows Version: Vista SP1
    CPU Type:
    HDD: Samsung 2,5" Spinpoint 120GB
    Memory: 2x 1GB GEIL
    Motherboard: Intel DG33TL
    Video Card: OnBoard
    Video Card Driver: latest
    Sound Card: OnBoard
    Sound Card AC3: no AC3
    Sound Card Driver: latest
    1. TV Card: Technotrend C-1501
    1. TV Card Type: DVB-C
    1. TV Card Driver: latest
    2. TV Card: Hauppauge PVR500
    2. TV Card Type: analog
    2. TV Card Driver: latest
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: ffdshow
    MPEG2 Audio Codec: ffdshow
    h.264 Video Codec: CoreAVC
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply: Seasonic S12 330W
    Remote: Microsoft RC2
    TV: Sharp LX3720
    TV - HTPC Connection: HDMI

    Teste gerade mal wieder MP und stelle fest dass sich leider immer noch nichts geändert hat. Bei FullHD Panels ist das ganz schön blöde.

    Gruß Thorsten


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. eclere

    eclere Portal Member

    Joined:
    August 31, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    DE
    Ratings:
    +0 / 0
    Ich habe mal den Source so angepasst dass die Bilder immer schön dem Bildschirm angepasst werden.

    PHP:
    1. void GetOutputRect(float iSourceWidth, float iSourceHeight, float fZoomLevel, out float x, out float y, out float width, out float height)
    2.     {
    3.         /* Original Source
    4.         // calculate aspect ratio correction factor
    5.         float iOffsetX1 = GUIGraphicsContext.OverScanLeft;
    6.         float iOffsetY1 = GUIGraphicsContext.OverScanTop;
    7.         float iScreenWidth = GUIGraphicsContext.OverScanWidth;
    8.         float iScreenHeight = GUIGraphicsContext.OverScanHeight;
    9.         float fPixelRatio = GUIGraphicsContext.PixelRatio;
    10.  
    11.         float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);
    12.         float fOutputFrameAR = fSourceFrameAR / fPixelRatio;
    13.  
    14.         width = (iSourceWidth / fPixelRatio) * fZoomLevel;
    15.         height = iSourceHeight * fZoomLevel;
    16.  
    17.         _zoomWidth = iSourceWidth;
    18.         _zoomHeight = iSourceHeight;
    19.  
    20.         // check org rectangle
    21.         if (width > iScreenWidth)
    22.         {
    23.             width = iScreenWidth;
    24.             _zoomWidth = (width * fPixelRatio) / fZoomLevel;
    25.         }
    26.  
    27.         if (height > iScreenHeight)
    28.         {
    29.             height = iScreenHeight;
    30.             _zoomHeight = height / fZoomLevel;
    31.         }
    32.  
    33.         if (_zoomHeight > iSourceHeight)
    34.         {
    35.             _zoomHeight = iSourceHeight;
    36.             _zoomWidth = _zoomHeight * fSourceFrameAR;
    37.         }
    38.  
    39.         if (_zoomWidth > iSourceWidth)
    40.         {
    41.             _zoomWidth = iSourceWidth;
    42.             _zoomHeight = _zoomWidth / fSourceFrameAR;
    43.         }
    44.  
    45.         x = (iScreenWidth - width) / 2 + iOffsetX1;
    46.         y = (iScreenHeight - height) / 2 + iOffsetY1;
    47.         end original source
    48.         */
    49.  
    50.  
    51.       // new source changed by eclere
    52.       float iOffsetX1 = GUIGraphicsContext.OverScanLeft;
    53.       float iOffsetY1 = GUIGraphicsContext.OverScanTop;
    54.       float iScreenWidth = GUIGraphicsContext.OverScanWidth;
    55.       float iScreenHeight = GUIGraphicsContext.OverScanHeight;
    56.       float fPixelRatio = GUIGraphicsContext.PixelRatio;
    57.  
    58.       float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);
    59.       float fOutputFrameAR = fSourceFrameAR / fPixelRatio;
    60.  
    61.       float csw = iScreenWidth;
    62.       float csh = iScreenHeight;
    63.       float factor = Math.Min(csw / iSourceWidth, csh / iSourceHeight);
    64.       height = iSourceHeight * factor;
    65.       width = iSourceWidth * factor;
    66.  
    67.       _zoomWidth = iSourceWidth;
    68.       _zoomHeight = iSourceHeight;
    69.  
    70.       x = (iScreenWidth - width) / 2 + iOffsetX1;
    71.       y = (iScreenHeight - height) / 2 + iOffsetY1;
    72.     }
    Einfach die komplette Funktion austauschen und neu komplieren. Der Code ist zu finden im Projekt "WindowPlugins". Im Ordner "GUIPictures" in der Datei "GUISlideShow.cs".

    Ich selbst nutze keinerlei Effekte während der Diashow, so dass ich diese auch nicht ausführlich getestet habe!
    Ein Backup der originalen WindowPlugins.dll schadet daher sicher nicht ;-)

    Gruß Thorsten
     
  4. Peter_1982

    Peter_1982 Portal Member

    Joined:
    July 19, 2008
    Messages:
    41
    Likes Received:
    2
    Location:
    Stuttgart
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Compilieren ?

    Grüß dich,

    könntest du die fertige compilierte Datei hochladen und verlinken ? Wäre Super...

    Peter:D:D
     
  5. eclere

    eclere Portal Member

    Joined:
    August 31, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    DE
    Ratings:
    +0 / 0
    Hallo,

    wenn Dir die RC32 reicht, ja. Mit der RC2 habe ich ein Problem, da ich nicht mehr an den Code ran komme. Mit diesem SVN komme ich irgendwie nicht klar.

    Gruß Thorsten
     
  6. Peter_1982

    Peter_1982 Portal Member

    Joined:
    July 19, 2008
    Messages:
    41
    Likes Received:
    2
    Location:
    Stuttgart
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Klaro, das sollte passen *g* Danke schonmal...
     
  7. eclere

    eclere Portal Member

    Joined:
    August 31, 2006
    Messages:
    47
    Likes Received:
    0
    Location:
    DE
    Ratings:
    +0 / 0
  8. Peter_1982

    Peter_1982 Portal Member

    Joined:
    July 19, 2008
    Messages:
    41
    Likes Received:
    2
    Location:
    Stuttgart
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
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!