user17189: I've tried all the swsflags options and figure the answer is no, but it can't hurt to ask just in case.  For example: downsample from 1920x1080 to 960x540, then upsample back to 1080 using the neighbor flag to recreate a perfect copy of the original 1080 image.  Neighbor comes very close but there seems to be some color shifting happening in the downsample.  Can another filter accomplish this, or is it simply the nature of the beast that downsampling will never be perfect?

user4169: That violates the rules of information theory. Look into the work of Claude Shannon if you wish to understand why what you are asking is mathematically impossible. 

user26178: The information on an image is not made of rubber, you can not shrink and expand an image that way.
Downsampling is re-sampling. Making new data out of the initial information. Normally it is based on an average.
One example.
I make a poll on how many times a week do people eat icecream in summer.

Jane 2
Jack 2
Sue 3
JohnTheIcecreamEater 7

The average is 3.5 icecreams per person... average.
If I tell you that the average of lemonade drinks on the same week is 2, you have no idea what the original values are. You do not know if there is a JaneLemonadeDrinker or not.

There is NO way to reconstruct the original data from an average, from a downsampled image.

There are some algorithms that can assume a bit of new data and invent it. But having the original data is way better for detailed information.

17189: <p>I've tried all the swsflags options and figure the answer is no, but it can't hurt to ask just in case.  For example: downsample from 1920x1080 to 960x540, then upsample back to 1080 using the neighbor flag to recreate a perfect copy of the original 1080 image.  Neighbor comes very close but there seems to be some color shifting happening in the downsample.  Can another filter accomplish this, or is it simply the nature of the beast that downsampling will never be perfect?</p>
 4169: <p>That violates the rules of information theory. Look into the work of Claude Shannon if you wish to understand why what you are asking is mathematically impossible. </p>
 26178: <p>The information on an image is not made of rubber, you can not shrink and expand an image that way.</p>

<p><strong>Downsampling is re-sampling</strong>. Making new data out of the initial information. Normally it is based on an average.</p>

<p>One example.</p>

<p>I make a poll on how many times a week do people eat icecream in summer.</p>

<ul>
<li>Jane 2</li>
<li>Jack 2</li>
<li>Sue 3</li>
<li>JohnTheIcecreamEater 7</li>
</ul>

<p>The average is 3.5 icecreams per person... average.</p>

<p>If I tell you that the average of lemonade drinks on the same week is 2, you have no idea what the original values are. You do not know if there is a JaneLemonadeDrinker or not.</p>

<hr>

<p>There is NO way to reconstruct the original data from an average, from a downsampled image.</p>

<hr>

<p>There are some algorithms that can assume a bit of new data and invent it. But having the original data is way better for detailed information.</p>
