I need a way to create a new image in Gimp which is completely black on one side, and completely white on the other. I've tried color to alpha but that did not seem to yield the correct results. I'm just looking for a workflow. I suspect it has something to do with adding new layers. Any suggestions?

Context: I'm trying to generate images similar to the MNIST dataset. The processed images show only black and white values. I'm trying to figure out why there are no gray pixels in my finished images. For debugging, I want to create an image which is black on one side, white on the other side. I will then downscale it to 3x3, which will result in the middle of the image having a gray value. I'm using area interpolation as my method of resizing the image.

The goal is to make the resultant image look as close as possible to these images: https://knowyourdata-tfds.withgoogle.com/#tab=STATS&dataset=mnist. Right now my images have no gray values, only black and white pixels.

The end goal is secondary for now, I'm just looking for a way to create an image that has black pixels on one side and white on the other side. I mentioned Color By ALpha because that is one of the things that came up when I was googling how to do this. The area interpolation method should create antialiasing and introduce gray values, but it doesn't.

  • 1
    Hi. Welcome to GDSE. Can you please show an example of what you are trying to achieve, or what has failed. It's hard to answer this question with so few details. Thanks.
    – Billy Kerr
    Sep 25, 2022 at 17:51
  • Hi, thanks for the update, but we need to see the images.
    – Billy Kerr
    Sep 25, 2022 at 18:24
  • Open a new image with white background. Select half.. Fill with black... save.. I'm not a GIMP user so I can't provide specific tool/features to use, but it seems really straight-forward. It doesn't sound as if there are any images @BillyKerr - At least how I read this.
    – Scott
    Sep 25, 2022 at 18:46
  • @Scott - I also read it that way at first, but then the OP mentioned using color to alpha. So It may or may not be as simple as we think, because colour to alpha is a method for removing a background. I'm at a loss TBH. Googling "MNIST dataset" didn't help. All I found is that it has something to do with machine learning/AI.
    – Billy Kerr
    Sep 25, 2022 at 19:03
  • 1
    I don't really disagree :)
    – Scott
    Sep 25, 2022 at 19:12

1 Answer 1


If you want an image with black on one side, white on the other, and a gray transition in between, use the blend tool with a black to white gradient (or the FG to BG (RGB) gradient with the default black/white foreground/background colors. You can use guides if you wan to accurately position the transition (and depress the Ctrl key while you drag, to constrain the gradient to be exactly horizontal). It looks like this:

enter image description here

  • Set up guides of needed (this makes the pointer "snap" to them when you are near)➊
  • Set the Tool to the adequate gradient➋
  • Shape should be Linear
  • No Repeat
  • You may want to turn off dithering (kept enabled here)➎
  • Click on the first guide to start the tool➏
  • Depress Ctrl and drag to the other guide➐
  • If necessary you can click on the midpoint and move it to change how the gradient evolves.➑

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.