Skip to content

Instantly share code, notes, and snippets.

@anandkunal
Created June 26, 2011 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anandkunal/1047092 to your computer and use it in GitHub Desktop.
Save anandkunal/1047092 to your computer and use it in GitHub Desktop.
// Invert the color spectrum
Surface::Iter iter(newSurface.getIter());
while(iter.line()) {
while(iter.pixel()) {
iter.r() = 255 - iter.r();
iter.g() = 255 - iter.g();
iter.b() = 255 - iter.b();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment