Opened 9 years ago

Last modified 4 weeks ago

#6937 in-progress enhancement

ShowImage 100% zoom not 100%.

Reported by: stippi Owned by: leavengood
Priority: normal Milestone: R1
Component: Applications/ShowImage Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

One can for example export a crisp PNG image from Icon-O-Matic, it will render blurry when opened in ShowImage, since it appears to be displayed several pixels too large in both directions. Hopefully this is not a side-effect of the processing of semi-transparent images, but the checker background is also not crisp, so that is not so likely.

Change History (12)

comment:1 by stippi, 9 years ago

Just noticed that the problem is with the "Stretch to window" option turned on. 64x64 images produced by Icon-O-Matic are slightly smaller than the minimum window size of ShowImage, so they are slightly stretched. Somehow this needs to work better, even with the option on.

comment:2 by axeld, 9 years ago

Type: bugenhancement

Let your ideas be heard.

comment:3 by leavengood, 8 years ago

I don't see how this can be fixed except by either decreasing the minimum size of ShowImage (might be tricky under layout management) or we remove the "Stretch to window" option, which I've always thought was not all that useful. Why would you ever want to stretch small images bigger by default? Shrink to window is useful of course, though there isn't an option for that anymore (which is fine I think.)

I say remove "Stretch to window".

comment:4 by axeld, 8 years ago

While images tend to get larger and larger, I don't think removing that feature is useful - think slide shows on HD monitors.

But if it is enabled by default, I would just change that.

comment:5 by halilpk, 8 years ago

(GCI-2011 Participant)

Haiku revision: hrev42211 not a bug. If the "Stretch to window" option is enable, it will be a problem but you can disable this option.After this there is no problem . System: Haiku hrev1-alpha3 on VMware workstation 8 on windows 7 32 bit

comment:6 by hometue, 7 years ago

(GCI-2012 Participant) Haiku revision: hrev44702. Valid, but this is not a bug. Disable "Strech to window" and it should be back to normal. I think that there should be an option made to allow zooming in without any interpolation applied to the image for people who wants to see the individual pixels in the image. System: Haiku R1-alpha4 on Virtualbox 4.1.20 on windows 7 64 bit

comment:7 by axeld, 2 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:8 by leavengood, 6 months ago

How about we ignore "Stretch to window" for images below the minimum window size? That at least fixes the main complaint here.

comment:9 by humdinger, 6 months ago

+1 There's still zooming to take a closer look at a tiny image.

comment:10 by pulkomandy, 6 months ago

For small images we should disable interpolation too. It won't do any good on them. Now we have to agree on what "small" means, but I think the minimum window size is a good guess.

comment:11 by leavengood, 7 weeks ago

Owner: changed from nobody to leavengood
Status: assignedin-progress

comment:12 by leavengood, 4 weeks ago

I started working on this, and it was easy to add a check for smaller images (I decided that anything 200x200 or below is "small".) But then it made me question the need for the "Stretch to window" option, which I now see I questioned 8 years ago too.

Axel thinks it is useful for slideshows, and that I might agree with, but I think better than an option would just be a good heuristic. Such as during a slideshow, if the image is within a certain percentage of the screen size, stretch it, otherwise don't. Of course now, 8 years later, images smaller than screens are probably pretty rare, so maybe even this heuristic is not so useful.

The other thing is I think the default window size behavior is bad, and I want to fix that too. I think the window should be sized to just perfectly fit the image at normal zoom, certainly when first opening an image in a new window. In most cases this would make "Stretch to window" pretty useless. Of course it may be up for debate what we do when the user changes the image with the cursor keys, but I still think in general we avoid the "useless options" idea in favor of good defaults and nice behavior, and I think what I am suggesting is better.

I'll experiment a bit and see what I come up with.

Note: See TracTickets for help on using tickets.