[MyPictures] Bilder an Bildschirmgröße anpassen (Hack in Post12)? (1 Viewer)

eclere

Portal Member
August 31, 2006
47
0
48
DE
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
 

eclere

Portal Member
August 31, 2006
47
0
48
DE
Ich habe mal den Source so angepasst dass die Bilder immer schön dem Bildschirm angepasst werden.

PHP:
void GetOutputRect(float iSourceWidth, float iSourceHeight, float fZoomLevel, out float x, out float y, out float width, out float height)
    {
        /* Original Source
        // calculate aspect ratio correction factor
        float iOffsetX1 = GUIGraphicsContext.OverScanLeft;
        float iOffsetY1 = GUIGraphicsContext.OverScanTop;
        float iScreenWidth = GUIGraphicsContext.OverScanWidth;
        float iScreenHeight = GUIGraphicsContext.OverScanHeight;
        float fPixelRatio = GUIGraphicsContext.PixelRatio;

        float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);
        float fOutputFrameAR = fSourceFrameAR / fPixelRatio;

        width = (iSourceWidth / fPixelRatio) * fZoomLevel;
        height = iSourceHeight * fZoomLevel;

        _zoomWidth = iSourceWidth;
        _zoomHeight = iSourceHeight;

        // check org rectangle
        if (width > iScreenWidth)
        {
            width = iScreenWidth;
            _zoomWidth = (width * fPixelRatio) / fZoomLevel;
        }

        if (height > iScreenHeight)
        {
            height = iScreenHeight;
            _zoomHeight = height / fZoomLevel;
        }

        if (_zoomHeight > iSourceHeight)
        {
            _zoomHeight = iSourceHeight;
            _zoomWidth = _zoomHeight * fSourceFrameAR;
        }

        if (_zoomWidth > iSourceWidth)
        {
            _zoomWidth = iSourceWidth;
            _zoomHeight = _zoomWidth / fSourceFrameAR;
        }

        x = (iScreenWidth - width) / 2 + iOffsetX1;
        y = (iScreenHeight - height) / 2 + iOffsetY1;
        end original source
        */ 


      // new source changed by eclere
      float iOffsetX1 = GUIGraphicsContext.OverScanLeft;
      float iOffsetY1 = GUIGraphicsContext.OverScanTop;
      float iScreenWidth = GUIGraphicsContext.OverScanWidth;
      float iScreenHeight = GUIGraphicsContext.OverScanHeight;
      float fPixelRatio = GUIGraphicsContext.PixelRatio;

      float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);
      float fOutputFrameAR = fSourceFrameAR / fPixelRatio;

      float csw = iScreenWidth;
      float csh = iScreenHeight;
      float factor = Math.Min(csw / iSourceWidth, csh / iSourceHeight);
      height = iSourceHeight * factor;
      width = iSourceWidth * factor;

      _zoomWidth = iSourceWidth;
      _zoomHeight = iSourceHeight;

      x = (iScreenWidth - width) / 2 + iOffsetX1;
      y = (iScreenHeight - height) / 2 + iOffsetY1;
    }

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
 

eclere

Portal Member
August 31, 2006
47
0
48
DE
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
 

Users who are viewing this thread

Top Bottom