home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
Bilder
[MyPictures] Bilder an Bildschirmgröße anpassen (Hack in Post12)?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="eclere" data-source="post: 294405" data-attributes="member: 24511"><p>Ich habe mal den Source so angepasst dass die Bilder immer schön dem Bildschirm angepasst werden. </p><p></p><p>[PHP]void GetOutputRect(float iSourceWidth, float iSourceHeight, float fZoomLevel, out float x, out float y, out float width, out float height)</p><p> {</p><p> /* Original Source</p><p> // calculate aspect ratio correction factor</p><p> float iOffsetX1 = GUIGraphicsContext.OverScanLeft;</p><p> float iOffsetY1 = GUIGraphicsContext.OverScanTop;</p><p> float iScreenWidth = GUIGraphicsContext.OverScanWidth;</p><p> float iScreenHeight = GUIGraphicsContext.OverScanHeight;</p><p> float fPixelRatio = GUIGraphicsContext.PixelRatio;</p><p></p><p> float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);</p><p> float fOutputFrameAR = fSourceFrameAR / fPixelRatio;</p><p></p><p> width = (iSourceWidth / fPixelRatio) * fZoomLevel;</p><p> height = iSourceHeight * fZoomLevel;</p><p></p><p> _zoomWidth = iSourceWidth;</p><p> _zoomHeight = iSourceHeight;</p><p></p><p> // check org rectangle</p><p> if (width > iScreenWidth)</p><p> {</p><p> width = iScreenWidth;</p><p> _zoomWidth = (width * fPixelRatio) / fZoomLevel;</p><p> }</p><p></p><p> if (height > iScreenHeight)</p><p> {</p><p> height = iScreenHeight;</p><p> _zoomHeight = height / fZoomLevel;</p><p> }</p><p></p><p> if (_zoomHeight > iSourceHeight)</p><p> {</p><p> _zoomHeight = iSourceHeight;</p><p> _zoomWidth = _zoomHeight * fSourceFrameAR;</p><p> }</p><p></p><p> if (_zoomWidth > iSourceWidth)</p><p> {</p><p> _zoomWidth = iSourceWidth;</p><p> _zoomHeight = _zoomWidth / fSourceFrameAR;</p><p> }</p><p></p><p> x = (iScreenWidth - width) / 2 + iOffsetX1;</p><p> y = (iScreenHeight - height) / 2 + iOffsetY1;</p><p> end original source</p><p> */ </p><p></p><p></p><p> // new source changed by eclere</p><p> float iOffsetX1 = GUIGraphicsContext.OverScanLeft;</p><p> float iOffsetY1 = GUIGraphicsContext.OverScanTop;</p><p> float iScreenWidth = GUIGraphicsContext.OverScanWidth;</p><p> float iScreenHeight = GUIGraphicsContext.OverScanHeight;</p><p> float fPixelRatio = GUIGraphicsContext.PixelRatio;</p><p></p><p> float fSourceFrameAR = ((float)iSourceWidth) / ((float)iSourceHeight);</p><p> float fOutputFrameAR = fSourceFrameAR / fPixelRatio;</p><p></p><p> float csw = iScreenWidth;</p><p> float csh = iScreenHeight;</p><p> float factor = Math.Min(csw / iSourceWidth, csh / iSourceHeight);</p><p> height = iSourceHeight * factor;</p><p> width = iSourceWidth * factor;</p><p></p><p> _zoomWidth = iSourceWidth;</p><p> _zoomHeight = iSourceHeight;</p><p></p><p> x = (iScreenWidth - width) / 2 + iOffsetX1;</p><p> y = (iScreenHeight - height) / 2 + iOffsetY1;</p><p> }[/PHP]</p><p></p><p>Einfach die komplette Funktion austauschen und neu komplieren. Der Code ist zu finden im Projekt "WindowPlugins". Im Ordner "GUIPictures" in der Datei "GUISlideShow.cs".</p><p></p><p>Ich selbst nutze keinerlei Effekte während der Diashow, so dass ich diese auch nicht ausführlich getestet habe!</p><p>Ein Backup der originalen WindowPlugins.dll schadet daher sicher nicht ;-)</p><p></p><p>Gruß Thorsten</p></blockquote><p></p>
[QUOTE="eclere, post: 294405, member: 24511"] 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; }[/PHP] 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 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
Deutsches MediaPortal Forum
MediaPortal 1
Bilder
[MyPictures] Bilder an Bildschirmgröße anpassen (Hack in Post12)?
Contact us
RSS
Top
Bottom