How can I invert the colors in an image using the Windows Imaging Component? I want to make white pixels black and black pixels white using the WIC. I tried using IWICBitmapDecoder::CopyPalette
and IWICPalette::GetColors
to retrieve the colors and invert them. But I couldn't do it successfully.
Asked
Active
Viewed 162 times
0

David Walschots
- 12,279
- 5
- 36
- 59

rij
- 1
-
Can you show us what you have tried and with what image (code, image file, ...)? – Simon Mourier Mar 16 '18 at 18:29
-
[DirectXTex](https://github.com/Microsoft/DirectXTex) has lots of example source of using WIC to manipulate images. – Chuck Walbourn Mar 17 '18 at 00:50