I
I
Ivaneo2013-09-17 03:29:56
Images
Ivaneo, 2013-09-17 03:29:56

Image scaling algorithm

Prompt a good image scaling algorithm.
The task - there is a texture, you need to reduce its resolution by half.
For example from 1024/512 px to 512/256 px.
Other aspect ratios and scaling are not needed. Only zoom out exactly 2 times. I am sure given these two conditions there are quite efficient algorithms. Preferably without significant loss in quality.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kosmos89, 2013-09-17
@kosmos89

And what prevents averaging 4 old adjacent texels for each new texel?

X
xanep, 2013-09-17
@xanep

A good algorithm depends on both your goals (speed/quality) and your image (photo/text, blurry/pixelated). Are you sure that you want to implement something yourself, and not use ready-made solutions? There are libraries for this in any language. Well, or if you are using OpenGL, for example, you can simply draw the texture into a buffer of the desired size. In any case, without understanding your goals and available means, it is very difficult to recommend something.

M
m08pvv, 2013-09-17
@m08pvv

Decrease texture resolution by half? Do you need a mipmap ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question