Created
September 24, 2014 10:13
-
-
Save JulesGorny/8ae91322b22ccc0415aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Functions to copy a pixel | |
void Anonymizer::copyPixel(const Uint8* src, Uint8* dest, int at, int SamplesPerPixel) | |
{ | |
for(int spp=0; spp<SamplesPerPixel; spp++) | |
dest[at+spp] = src[at+spp]; | |
} | |
void Anonymizer::copyPixel(const Uint16* src, Uint16* dest, int at, int SamplesPerPixel) | |
{ | |
for(int spp=0; spp<SamplesPerPixel; spp++) | |
dest[at+spp] = src[at+spp]; | |
} | |
//Functions to modify a grayscale value | |
void Anonymizer::setDataGrayScale(Uint8* img, int at, int SamplesPerPixel, Uint8 value) | |
{ | |
for(int spp=0; spp<SamplesPerPixel; spp++) | |
img[at+spp] = value; | |
} | |
void Anonymizer::setDataGrayScale(Uint16* img, int at, int SamplesPerPixel, Uint16 value) | |
{ | |
for(int spp=0; spp<SamplesPerPixel; spp++) | |
img[at+spp] = value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment