codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
If I have an image sized (x1, y1), and I want to resize it to (x2, y2) I can do it in the following way: * For each line in the original image, repeat each pixel x2 times. * Repeat the resulting line y2 times, giving an image with dimensions (x1*x2, y1*y2) * For each Block of (x1, y1) pixels in the resulting image, take the sum of the pixels and divide by x1*y1 ie average it. Does this algorithm have a name? Is it mathematically equivalent to one of the standard resizing methods?
Private
[
?
]
Run code
Submit