[fixed] - Thumbzoom miscalculated

Discussion in 'MediaPortal 1.2.0 ALPHA' started by pilehave, February 15, 2011.

  1. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    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 (Text):
    1.  
    2.         <itemWidth>127</itemWidth>
    3.         <itemHeight>187</itemHeight>
    4.         <textureWidth>127</textureWidth>
    5.         <textureHeight>187</textureHeight>
    6.         <thumbWidth>127</thumbWidth>
    7.         <thumbHeight>187</thumbHeight>
    8.         <thumbPosX>0</thumbPosX>
    9.         <thumbPosY>0</thumbPosY>
    10.         <zoomXPixels>40</zoomXPixels>
    11.         <zoomYPixels>60</zoomYPixels>  
    12.  
    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.
     

    Attached Files:

    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    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 :)
     
  4. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    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 (Text):
    1.  
    2. //pImage.Width = _textureWidth + _zoomXPixels - 4;
    3. //pImage.Height = _textureHeight + _zoomYPixels - 4;
    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
     
  5. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    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.
     
  6. elliottmc
    • Team MediaPortal

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
  7. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    I'll post a patch this weekend, it's really just a matter of discarding the -4 in the GUIThumb-files.
     
    • Like Like x 1
  8. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    Stupid me went mindless and forgot all about the patch :(

    Attached!

    :oops: & :sorry:
     

    Attached Files:

    • Like Like x 2
  9. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    • Like Like x 1
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!