

Rotate image without losing information - riyadparvez
https://gist.github.com/riyadparvez/4467802

======
lutusp
> Rotate image without losing information ...

Actually, lossless rotation is only possible for 90/180/270 degrees, otherwise
some information loss is unavoidable.

~~~
riyadparvez
No it preserves information by not losing any pixel, instead it pad extra
pixel

~~~
lutusp
Fine. Rotate an image to an angle that's not a multiple of 90 degrees and that
is the same size, then rotate it back. Compare the old and new. They will not
be the same, _because of lost information_.

I can't believe you don't know this -- rotating bitmap images at angles other
than multiples of 90 degrees _always loses information_.

~~~
riyadparvez
Oh, yes. That's true. I thought you are talking about losing pixel.

~~~
lutusp
But loss of information and loss of pixel content are the same thing. If you
have an image with dimensions of, say, 1000 x 1000 pixels, and you rotate it
other than a multiple of 90 degrees, you will lose much of the original pixel
content. It's unavoidable.

