#58 Fit modes ignore "Stretch small images" preference option

SVN
closed
Ark
None
5
2013-06-01
2013-05-01
Oddegamra
No

Hello Ark,

In zoom.py, your recent changes apparently broke "Fit to width" mode's scaling of small images. Normally, images should be scaled down if necessary, and up only if "Stretch small images" is selected. For now, it appears that "Fit to width" ignores this option and always scales images to fit the complete window width.

Discussion

  • Ark
    Ark
    2013-05-01

    I tried to reproduce this bug. At first, it looked like I could do so, but now it looks like this bug simply vanished. Could you please give more detailed instructions on how to reproduce this?

     
  • Oddegamra
    Oddegamra
    2013-05-01

    It seems like there is more to this issue than I first suspected. I have an image which is around 600x850px large. When I switch MComix to full-screen, i.e. about 1920x1080, Fit to Width works as expected. When I scale down the MComix window, the image suddenly enlarges. Maybe if the viewport's height is smaller than the image's height, so less than 850px in this case?

     
  • Oddegamra
    Oddegamra
    2013-05-01

    Fit to Height mode has the same problem in reverse, i.e. the image will scale up if the viewport's width is smaller than the image's.

     
  • Ark
    Ark
    2013-05-01

    I just tried it again, even with configs resetted. I really cannot reproduce it, sorry. :( (Meh, this bugs me somehow. Pun intended.)

    Besides, what do you think about ignoring "Stretch small images" when using "Manual zoom mode"?

     
  • Oddegamra
    Oddegamra
    2013-05-01

    I changed an "and" to "or" in get_zoomed_size where get_scale_up is tested, which seems to do the trick.

    Concerning "Stretch small images" in manual zoom mode - it used to be ignored, but someone complained, so I changed that part. It's probably better to honor the setting in all zoom modes to avoid inconsistent behavior.

     
  • Oddegamra
    Oddegamra
    2013-05-01

    • status: open --> closed
     
  • Ark
    Ark
    2013-05-01

    Concerning "Stretch small images" in manual zoom mode - it used to be ignored, but someone complained, so I changed that part. It's probably better to honor the setting in all zoom modes to avoid inconsistent behavior.

    Well, I think that "manual zoom" is not really "manual" if it upscales small images by itself. But I also think that, in this case, stretching small images feels more natural. So I changed it back to the old behavior.

    Furthermore, I could finally reproduce the problem you described in this ticket. Thank you for pointing it out.

     
  • Ark
    Ark
    2013-05-29

    The commit message about r916 says:

    Fix "Fit to Width" not scaling up small images.

    This mode needs to ignore the "Scale up small images" setting
    and always respect the user's specified size.

    Is there a ticket or something saying this is a must? I think that the changes made in r916 only remove features. In r915, the user could choose whether he or she permits upscaling. However, in r916, this feature is gone but nothing is actually gained: If someone wants to have the r916 behaviour, the user could simply turn on "Stretch small images".

    What do you think?

     
  • Oddegamra
    Oddegamra
    2013-06-01

    You're completely right. There even was a ticket that said images should only scale up if the option to scale small images was ticked. My bad, I thought it was the other way round.