Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Pixel art edges become jagged when rotated with nearest-neighbor interpolation

New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

While trying to rotate an image with Nearest-Neighbor interpolation at a 45 degree angle, the edges become overly jagged and not in a straight line.

 

When rotating the image, the preview shows the way I want the image to be, however, when I apply the changes, the edges become overly jagged and distorted. 

 

Is there any fix to this?

 

Examples are shown below.

 

Before rotation

imalreadyt76204691_0-1625807172969.png

Preview (Ideal)

imalreadyt76204691_1-1625807225564.png

After applying

imalreadyt76204691_2-1625807242682.png

 

TOPICS
Problem or error

Views

99

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Go into Preferences > General and try Bicubic Automatic:

Screen Shot 2021-07-08 at 10.48.03 PM.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

I want sharp edges, similar to nearest neighbor interpolation, just without the overly jagged edges shown. Bicubic Automatic tends to not have sharp edges and have miscolored pixels, as shown below. 

 

Screenshot_5.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

I'm assuming that you have a reason to use Nearest Neighbour. Maybe you are producing pixel art for your project?

So my idea was to rotate the rectangle with Bicubic Automatic which will use anti aliasing to soften the edge, and then use levels or Threshold to remove the aa and see if that produces a less ugly edge.  However, things got a bit weired on me.

 

AFAICT your rectangle is 60 pixels long and full white.  Rotating the white rectangle -45° looks like this.  I have turned off the pixel grid, and the zoom ration is 1200%.  There is obvious aa so I should be able to harden up the edge.

image.png

 

The same thing against a black background shows the aa as looking darker, so I'm guessing those pixels are still at, or close to, 255,255,255 but with reduced opacity.  This gave me a problem.

image.png

 

Threshold set all the way up to 255 had no effect on the white rectangle, because the aa pixels must already have been at 255,255,255 but with the afore mentioned reduced opacity.  Bummer!

 

image.png

Giving a Levels adjustment layer the entire canvas to work on did kill the aa

image.png

But if you clipped it to the white rectangle, you are back where you started from

image.png

 

So no help to you, but I enjoyed tracking down what was initially a bit of a mystery to me. I wonder if we can be of more help if you tell us why you needed to Nearest Neighbour?  Is it some sort of pixel art?  We do still get questions about pixel art so it must still be a thing.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

LATEST

Interesting, yeah its for a largescale pixel art project. The pixel art I am creating must fit into a specific color pallete for it to work in the way I want it to. This is one of the reasons I don't want to use other antialiasing methods (along with thinking nearest neighbor looks better while working with pixel art in general)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines