Image viewer - smoothing when zooming

Zooming with the image viewer usually smooths images, but with certain files, no smoothing occurs and pixels remain whole.

How does Opus determine whether or not to smooth? Do users have any control over if/when this happens?

It might depends on the bit depth of the image, at a rough guess. Opus just uses the OS functions for scaling and I can imagine that 24 and 32 bit images might get smoothing whereas 8 bit ones may not. Just a guess though!

The OS (or maybe it's up to the graphics drivers) decides how to scale some images based on what they contain. It uses some kinda of heuristic.

This causes some oddities with my animated GIF plugin: If you scale up some animations then some frames get scaled using bilinear and others using nearest-neighbour, so the smoothing pops on and off for some frames.

e.g.


Hmm that makes sense. I think it was just some GIFs that were not smoothed when scaled.

If Opus uses OS functions for this, I guess it would not do much good to submit a feature request for an option to turn smoothing off? I remember such an option in the image viewer I used to use, but the Opus viewer is just too handy to part with :smiley:

Turning off the smoothing is possible but I don't think there's a way to force it on even when the OS doesn't think it should be used. We could use our own scaling function but it'd be slower than letting the graphics hardware do it.

Maybe when/if the viewer is re-written to use Windows 7's Direct2D instead of the old GDI API. :slight_smile:

In the begining of dopus6, there was a function to remove the bilinear in the viewer, three year that i ask to the support of dopus to put this old feature or to separate high quality picture betweeb thumbnails and viewer, no answer, i wonder why they put an mail support function, i know that dopus must have several codes lines but in three year a small funtion like that, pffff...............i have check the new 9.1.3.0 features/bugs modifications, it's a long time that dopus make me jump on roof, i don't know if there will be an dopus 10, but i will think about it twice before buy itn because it's not cheap in second point...don't get me wrong, i mean i think the dopus 9 is enough.

Maybe they didn't see the need for it?

The option to turn off smooth scaling was there for really slow machines back in the early days. IMO it's not needed anymore.

(Same with the grey-scale JPEG thumbnails option. That was there for PCs so slow that it was worth generating JPEG thumbs without colour but I can't imagine anyone wanting that now?)

i originally asked because i do a lot of work with PNG images that are built pixel by pixel. the opus viewer is fast and convenient, but since it always smooths images when i zoom i on them, it's kind of useless for viewing the pixel-level detail of the sorts of images i work with.

Ah that makes sense. I thought you had the opposite problem where you wanted it smooth all the time but sometimes it wasn't (due to the OS/drivers sometimes choosing not to use smooth scaling).