Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Techniques Used to Distort Images

Author
Message
Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 9th Mar 2011 07:15
So i guess the title is a little bit vague, but i have always wondered, how do you resize an image so it looks the same? Obviously if you make it smaller, you need to get rid of pixels but retain pixels so you know what it is supposed to look like. How is this done?

Answers appreciated!

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 9th Mar 2011 07:48
interpolation!
http://www.cambridgeincolour.com/tutorials/image-interpolation.htm

uhhh, odd though, I can't find any really good pictures of bilinear interpolation for image resizing....

Linear interpolation works like this: First, you have an interpolation value, T. When T=0, your function returns a value A. When T=1, your function returns the value B. For linear interpolation, the equation, F(T)=(b-a)*T+a. As T varies from 0 to 1, F(T) varies from A to B.
in 2d, with colors, that looks like this:
http://www.cs.lmu.edu/~ray/images/ogl-triangle.png
The colors are only given at each vertex of the triangle, but you can interpolate between each vertex. Imagine the vertices are pixels, and the gradient is a "continuum", that will eventually be rasterized (= a finite 2d array of pixels). So if you have a grid of pixels, you can come up with a continuum of colors (what I mean by continuum is that there is no smallest unit). Then, you resize the thing, and take differnet points on that continuum, and turn 'em into pixels!

Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 10th Mar 2011 01:06
Thanks! That is cool information

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

Login to post a reply

Server time is: 2025-05-23 06:44:32
Your offset time is: 2025-05-23 06:44:32