0

As seen in post: Remove color gradient from scaled unit bitmap, the answer works with 1x1 pixel. How to achieve the same result with, for example, 2x2 pixels with red, blue, green and yellow colour, how to remove gradient in that case (stretched image) with SetPixel?

  • That answer performs a `.Clear([Color])` in a new Bitmap of the same size as the original. It does not use `SetPixel()`. – Jimi May 04 '18 at 08:15
  • I don't see what the problem is, have you tried it? whats the error, and what does `1x1 pixel` mean – TheGeneral May 04 '18 at 08:22
  • The original question wasn't even about removing a gradient, it was about preventing it from being generated by the stretching mechanism. The answer is still the same; paint on the full picture instead of making a 1x1 picture and stretching it. I advice `.Clear` or `.DrawRectangle`. – Nyerguds May 04 '18 at 08:32
  • The question was not how to remove but how to avoid the 'gradient', which really was just antialiasing on pixel over a large area. If you mean how to enlarge an image without anti-aliasing the pixels see [here](https://stackoverflow.com/questions/5606292/undesired-anti-aliasing-when-drawing-bitmap-on-a-window) – TaW May 04 '18 at 08:32

0 Answers0