This file contains 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
int clamp(int val) { | |
if (val < 0) return 0; | |
if (val > 255) return 255; | |
return val; | |
} | |
unsigned char layerMerge(unsigned char **layers, unsigned int layerCount, unsigned int layerWidth, unsigned int layerHeight) { | |
if (1 >= layerCount) return 0; | |
unsigned char isNewLayer = 0; | |
unsigned int i, j, byteCount; |