How to scale up pixel art with "nearest neighbor" interpolation?

I’m running Harmony 21.0.1 on MacOS 10.15.7.

The problem I’m running into is when I import pixel art in the form of raster images into Harmony, I am not able to scale them up without Harmony adding extra colors in between the pixels. I would like to keep all of the colors intact and not have any new colors that aren’t in the original image. In photoshop there’s the option to use “nearest neighbor” scaling, every other program I’ve used has some kind of equivalent of that function, but for some reason I’m not able to find it in Harmony.

Here’s an example of what I’m talking about:


(Notice the small line of different-color pixels that harmony calculates that I do not want. This is zoomed in at 500%, so it’s one pixel wide)

Here is what I want it to look like:


(again this is zoomed in at 500%, all colors are intact and no extra colors are added)

Surely Harmony has got to have this option somewhere? I’ve looked at the documentation and the forum threads here and wasn’t able to find anything.

Hi,

When working with bitmap images you always need to make sure that the resolution/size of the images to be imported fits to the needs of the maximum scale/zoom value of your scene.

Harmony uses a resampling method for bitmap (raster) artwork/images.

Is there any way to turn off this feature? Every other software I’ve used has the option to turn this off.

No, every program has some method of image re-sampling/interpolation.

Hmm,

What software do you mean?
What are the names of these features?

I’m trying to compare this case to After Effects.
There, you also would need to prepare the bitmap sources in a 3rd party application to make sure that they will meet the needs of the shot’s scale/zoom.

Yes, and every program I’ve ever used has the option to turn it off. Photoshop has “Nearest Neighbor” scaling, After Effects has the “Quality And Sampling” column that you can toggle to turn off re-sampling, etc.

I guess I’m SOL and Harmony doesn’t have the option to turn off re-sampling for bitmaps. Oh well, back to using workarounds.


Here’s how you would turn off re-sampling in After Effects

I’m talking transforming a image or selection.
In Photoshop in ‘Preferences>General’ you have ‘Image Interpolation’ I do not see an off. Yes ‘Nearest Neighbor’ is a method of resampling/interpolation. From the menu under ‘Image>Image Size’ yes you can disable ‘Resampling’ but that wasn’t what I was talking about.

Yes After Effects has ‘Quality and Sampling’ in the Timeline Layer which has a ‘Draft’ quality, which I’m not going into.

You can always contact support and see what they say.

Indeed,

After Effects’ layer’s quality set to “Draft” equals to disableing image interpolation.
Thak you for the your explanations.

I don’t think that Harmony has this option at present.
But, you could make a feature request.

They recently added different preview quality modes.
Maybe, the piece of code is still on their desk and they could adapt it to create a Render Mode that doesn’t use image resampling.

Would this help?
Or would you need this option to be available for each layer?

Thanks for your response, I will make a feature request. I would probably want the option for each layer individually, like how there’s the option to set antialias quality to “none” for vector layers.

I don’t know at what level image sampling is handled within Harmony.
But, maybe a new node or a new mode of a composite could be developed for that.

1 Like