Skip to main content
Participant
September 26, 2017
Answered

Can I resize an image without color variation?

  • September 26, 2017
  • 2 replies
  • 3388 views

I'm working at a project of image segmentation assessment, and I've to generate the masks (groundtruth) in Photoshop. The masks are black, gray and white, but I need to have just three tones of  those colors, in other words: #afafaf #ffffff and #000000 .. I need to do these masks for 15 other resolutions, but when I resize these images, I noticed that there are color tone variations in the new one.

Can someone help me, please? How can I resize the images without changing or varying the original colors, keeping only the three colors defined?

Thanks!!

This topic has been closed for replies.
Correct answer c.pfaffenbichler

When one starts with the biggest version and downsamples with the Resample Method Nearest Neighbor there should be no anti-aliasing-like effect.

2 replies

angie_taylor
Legend
September 26, 2017

Off the top of my head, you could use a Posterise Adjustment Layer to force the image to only use 3 colours? It's probably the anti-aliasing that's causing the issue. c.pfaffenbichler is right about the size of the image being important too. Always start with the biggest size and scale down as opposed to enlarging. Also, when you save the image you can use GIF to make sure that you only use 3 colours.

c.pfaffenbichler
Community Expert
c.pfaffenbichlerCommunity ExpertCorrect answer
Community Expert
September 26, 2017

When one starts with the biggest version and downsamples with the Resample Method Nearest Neighbor there should be no anti-aliasing-like effect.

c.pfaffenbichler
Community Expert
Community Expert
September 26, 2017

Why do you use the pretty much meaningless hex-names?

Do you create the Masks as RGB?

I resize these images, I noticed that there are color tone variations in the new one.

That depends on your Resample method (or Image Interpolation) settings.

One could address the effects with Adjustment Layers, though.

What are the exact pixel dimensions you need to create and do you originally create the Mask in the largest version?