Menu

#19 Unscale large images button

SVN
open
nobody
5
2013-01-08
2011-08-20
Anonymous
No

In fit width and fit height modes: if the image is more than visible area - set the original resolution.

Discussion

  • Nobody/Anonymous

     
  • Oddegamra

    Oddegamra - 2011-08-21

    But then it wouldn't be ``Fit to height'' and ``Fit to width'' anymore. Those modes aren't supposed to scale up images, but to scale them down.

     
  • Alan Horkan

    Alan Horkan - 2011-11-22

    I was not the original submitter of this request.

    It is late and I'm tired but I think I've figured out something that might work and give me and others more flexibility:
    Do not lock the Zoom controls.
    Allow users to Zoom in, Zoom out, and Zoom Normal, irrespective of the main View mode.

    This would result in only a temporarly change of zoom level and then when you move to the next page you would be back to Height/Width/Best/Manual again. (I'm pretty sure what I'm trying to describe is just consistent with what many image viewers do and should seem pretty ordinary.)

    I'll ponder this further when I've had sleep and I'm thinking more clearly. I'll see if I can bang out a patch and try it properly and compare to other programs.

     
  • Oddegamra

    Oddegamra - 2011-11-22

    To tell the truth, I've heard other people complain in the past about Zoom being locked to "Custom" zoom mode. Thinking about it, it doesn't really make much sense from the outside, but I can see where herrekberg came from when he made that decision back in Comix. The computation of image width and hight in main/_draw_image is largely dependent on which zoom mode was selected.

    Maybe this should be changed: Strip away all the conditional branches, and only compute the zoom factor once when switching images, depending on zoom mode. For example, when "Fit to height" is selected, the zoom factor would be set to 76.64787237%, so that the whole image fits to the screen's height.

     
  • Oddegamra

    Oddegamra - 2011-11-22

    Or, alternatively, interpret base image size differently depending on zoom mode. So, when fit to width is selected, 100% would be as much as needed to show the complete image's width, while 100% in custom zoom mode would be the original image size. Looking at the code, this might be easier to implement.

     

Log in to post a comment.