Skip to content

Instantly share code, notes, and snippets.

@SubhiH
Created December 26, 2018 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SubhiH/9b70701dd741cf9a7367d1df6ebc05c0 to your computer and use it in GitHub Desktop.
Save SubhiH/9b70701dd741cf9a7367d1df6ebc05c0 to your computer and use it in GitHub Desktop.
void ImageOperator::rotate(const unsigned char* input,
const int width,
const int height,
const int channel,
unsigned char* output){
for (int row = 0; row < height; ++row) {
for (int col = 0; col < width; col+=1) {
output[col*width+width-1-row] = input[row*width+col];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment