[fixed] Thumbzoom miscalculated (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Using SVN 27452 I have found out that MediaPortal has a miscalculation in normal and big thumb-layout in the facadeviews.

    The root to all of this was, that I could never get my thumbnails to zoom the same amount in left/right and top/bottom.

    Using Mustayaluca as a test-skin I found that this was in all skins, there is missing 4px when you add the zoomXPixels to the thumbWidth.

    In my example below, I have the following attributes in the thumb-layout:

    Code:
            <itemWidth>127</itemWidth>
            <itemHeight>187</itemHeight>
            <textureWidth>127</textureWidth>
            <textureHeight>187</textureHeight>
            <thumbWidth>127</thumbWidth>
            <thumbHeight>187</thumbHeight>
            <thumbPosX>0</thumbPosX>
            <thumbPosY>0</thumbPosY>
            <zoomXPixels>40</zoomXPixels>
            <zoomYPixels>60</zoomYPixels>

    As you can see in my attached screenshot, things does not quite add up. 127 + 40 should equal 167, but when you measure the thumb it is only 163 pixel wide.
    Same goes for the height, here we are also missing 4 pixels...

    I will look for the miscalc. in the code - but this should be considered a bug IMHO.
     

    Attachments

    • thumbzoom_miscalculation.jpg
      thumbzoom_miscalculation.jpg
      323.2 KB

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    What is the skin size? 1280x720? I see your screenshot is showing 1365x768 and you're not in full screen mode.

    Try measuring after you START MePo in full screen. I'm not sure it will matter but it's worth a try before you dig in the code :)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    Oh, but that was just a badly resized window. I have attached a window where the inner dimensions are exactly 1360x768 which is the skin-size.

    Doesn't really matter, if you do the same on a 1920x1080 skin and run it in full-screen, you are still 4 px short in both sides.

    I found the culprit;

    All images (poster, mask etc.) was subtracted 4 px:

    Code:
    //pImage.Width = _textureWidth + _zoomXPixels - 4;
    //pImage.Height = _textureHeight + _zoomYPixels - 4;

    Unless there is a really good explanation to this, I don't see why you would do that.

    EDIT:
    Made some screenshots without frames, as the make it hard to see what is going on:

    thumbzoom_without_fix.jpg
    4 px missing in right and bottom

    thumbzoom_with_fix.jpg
    There, spot on. Same distance on all 4 sides
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Yeah, I have no idea why those -4 pixels are there. But seems unneeded now. Perhaps someone else can explain :)

    And lol, I just now realized the real reason why this has been bugging you. At first I thought that 4px doesn't matter but now I see that the image is not centered.

    From the code, the same should be true for vertical alignment. Upper part of the zoom should be 4px higher than the lower part.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Do you have a patch for this? I guess that might be the best way for someone else (if needed) to take notice of this.

    Best wishes,

    Mark
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #6
    I'll post a patch this weekend, it's really just a matter of discarding the -4 in the GUIThumb-files.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #7
    Stupid me went mindless and forgot all about the patch :(

    Attached!

    :oops: & :sorry:
     

    Attachments

    • Patch thumbzoom calculation SVN27754.patch
      2.2 KB

    Users who are viewing this thread

    Top Bottom