Bug in zoom-out ??? (1 Viewer)

lkuech

Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    50
    Hamburg
    Home Country
    Germany Germany
    Hi.

    I've played a little bit with the source code ;)

    Attached you can find a WindowPlugins.dll which should fix all issues discussed here.
    Simple copy it to your "Plugins/Windows" folder. Make a backup of the existing file!

    This is for test propose only. If the changes work like requested and I've not build in any new bugs, I will see how I'am able to "play back" this piece of source code back to the devs....

    CU
    Lars
     

    DalaNorth

    Retired Team Member
  • Premium Supporter
  • December 18, 2006
    142
    1
    46
    Skellefteå, Sweden
    Home Country
    Sweden Sweden
    Hi lkuech! We appreciate your work!

    I have not tested your dll yet, since I don't know what you have done to it, but please post your patch to our patch section on SourceForge so that we can verify it and integrate it in the main code branch.

    Follow the instructions here:
    Patch Policy

    Again, :D

    Regards
    DalaNorth
     

    DalaNorth

    Retired Team Member
  • Premium Supporter
  • December 18, 2006
    142
    1
    46
    Skellefteå, Sweden
    Home Country
    Sweden Sweden
    Thank you! :D

    I tested your patch, but it isn't quite perfect yet... Follow these steps to see some weird behavior:

    1. Skip to a small image that fits well within all bounds.
    2. Press 2. This will zoom the image in to fit the screen.
    3. Press Page Down -> Nothing happens
    4. Press Page Up -> Picture is zoomed out to actual size
    5. Press Page Down -> The picture is zoomed in to 200%
    6. Press 1 -> Picture is zoomed out to actual size
    7. Press Page Down -> The picture is zoomed in to fit screen.

    Step 3->Nothing happens. Seems wrong...
    Step 5 and 7 -> Different results zooming in from actual size

    The results seem to differ a bit depending on how small the picture is to begin with. Probably due to the MAX_ZOOM_FACTOR. But try it a bit and I'm sure you'll see the problems too.

    I haven't had to time to look at the code to understand why this happens, but you should already be somewhat familiar with how it works, so please try again!

    Regards
    DalaNorth
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    50
    Hamburg
    Home Country
    Germany Germany
    Yes. One of the problems seems to be, that all zoom level calculations are based on _defaultZoomFactor which may be different from file to file.

    So well... I guess I have to analyse the code a little bit deeper. I hope it will be still possible to fix it with hand full of changes... but we will see ;)

    BTW: The "ZoomOut" bug itself is a single line in the "case Action.ActionType.ACTION_ZOOM_OUT:". The line "_isPictureZoomed = false;" was missing and because of this the behaviour of the left and right keys remains in moving mode...

    CU
    Lars
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    50
    Hamburg
    Home Country
    Germany Germany
    Oh damn... a small "<" makes a huge difference if the code is designed to use a "==" :D
    ... Ok I guess I've found the problem.

    Code:
          if (_isSlideShow) _isPictureZoomed = _userZoomLevel [B]==[/B] 1.0f ? false : true;
          else _isPictureZoomed = _userZoomLevel [B]==[/B] _defaultZoomFactor ? false : true;

    makes more sense ;)

    But I will do some more testing.
    How should I proceed further. Simple attach the new .cs file at sourceforge or is it easier for you if I provide a svn patch?

    CU
    Lars
     

    DalaNorth

    Retired Team Member
  • Premium Supporter
  • December 18, 2006
    142
    1
    46
    Skellefteå, Sweden
    Home Country
    Sweden Sweden
    The new .cs file will be fine.

    Regards
    DalaNorth

    PS. Tried editing those lines according to your post, but there are still problems...
     

    lkuech

    Retired Team Member
  • Premium Supporter
  • February 16, 2007
    576
    83
    50
    Hamburg
    Home Country
    Germany Germany
    Hi again.

    I've uploaded a new version. Additionally to the line I have posted, there was a modification of the zoom out action (back to the original... nearly) I forgot to mention...
    :sorry:

    Take a look at the new file. I've tested it with a lot of images. Larger and smaller than my screen resolution. It seems to work as I expected even with a 16:9 skin.

    All the "problems" that I was still able to found were there before ;) Like not being able to zoom very small images (16x16) etc.

    CU
    Lars
     

    Users who are viewing this thread

    Top Bottom