This looks at the first pixel in the image, and shifts the entire image by the vector difference between that pixel and the dstColour. For better control, use ChangeImageColour(wxImage, wxColour*, wxColour*) below
| 35 | /// pixel and the dstColour. For better control, use |
| 36 | /// ChangeImageColour(wxImage, wxColour*, wxColour*) below |
| 37 | std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage, wxColour & dstColour) |
| 38 | { |
| 39 | unsigned char *src = srcImage->GetData(); |
| 40 | wxColour c; |
| 41 | c.Set(src[0], src[1], src[2]); |
| 42 | return ChangeImageColour(srcImage, c, dstColour); |
| 43 | } |
| 44 | |
| 45 | ///This will explicitly shift the image color from |
| 46 | ///srcColour to dstColour. |