Jump to content

rotation, pixel by pixel


Recommended Posts

I'm comparing how Paint.NET (v.3.36), Photoshop (v.11), and Corel Photo-Paint (v.12) rotate images.

Eight small bitmaps are at this link.

I made two test patterns, one even sized and the other odd sized, in case the programs are funny about counting.

Each program was used to rotate each test pattern 45 deg clockwise. Photoshop offers choice of interpolation method: I used bilinear.

For either of these test patterns, if rotation is about the center of the image -- meaning the center point of the center pixel of the odd test pattern or the point between the four central pixels of the even test pattern -- then you'd expect the original symmetry preserved with 45 deg rotation. The Corel rotations do that. (There are just rounding errors in the pixel values.) The Paint.NET and Photoshop rotations definitely don't. Paint.NET and Photoshop, each in their own way, produce unusual clusters with unusual values strongly breaking symmetry. Paint.NET and Photoshop, each in their own way, must do image rotation about points different from the image center.

Image rotation is not a pretty thing for pixilated images. I studied what happens to an isolated white pixel (value 255) surrounded by black when the image is rotated 45 degrees and bilinear interpolation is used. The single pixel splits into 2, 3, 4, or 5 pixels depending on where it falls after the rotation. The total value within the new cluster of pixels varies from 211 to 343. (In my calculations a pixel is treated as a point rather than as a uniform square area, because I think that's how they're always treated for interpolations, although they shouldn't be.)

So, about which point does Paint.NET do its image (properly, layer) rotation? Why not the center point? And what interpolation method does Paint.NET use with image rotation?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...