New image functions:

* invert
 * flip_horizontal
 * flip_vertical
 * rotate

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1472 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-08-03 14:56:45 +00:00
parent 726bd9c135
commit ca0e762b64
20 changed files with 286 additions and 20 deletions
+10
View File
@@ -60,3 +60,13 @@ void saturate(Image& image, double amount) {
}
}
}
// ----------------------------------------------------------------------------- : Color inversion
void invert(Image& img) {
Byte* data = img.GetData();
int n = 3 * img.GetWidth() * img.GetHeight();
for (int i = 0 ; i < n ; ++i) {
data[i] = 255 - data[i];
}
}