0

I want to create a c# WPF App program in Visual Studio. How can I make a way to scan a bitmap image and set every pixel lower than a certain value to black and keep all other pixels the same? Impzu

Impzu
  • 1
  • 1
    So what have you tried, or researched ... There are about a 10000 pages on the internet discussing how to iterate of the the pixels of an image. Without giving you a whole solution, we dont know where you are at, and what issues you are encountering – TheGeneral Mar 01 '21 at 00:45
  • Your question lacks focus. There are a number of elements to the problem, and nothing in your question to indicate whether you have tackled any of the elements, never mind which one specifically is giving you trouble. That said: in a brute-force implementation, the first step is to retrieve the individual pixel values. See duplicate for that. If, however, you mean to do this strictly to _display_ the bitmap, you may want to implement a shader effect for the purpose. For details on that, see https://stackoverflow.com/questions/45093399/how-to-invert-color-of-xaml-png-images-using-c – Peter Duniho Mar 01 '21 at 00:52

0 Answers0