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
| /* Amei face decoder: gcc -O2 amei.c -lm && ./a.out > amei.png */ | |
| #include <math.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #define foreach(a, d) for (int a = 0; a < d; a++) | |
| #define A(v) ((v) < 0 ? -(v) : (v)) | |
| #define C8(v) ((v) < 0 ? 0 : (v) > 255 ? 255 : (v)) | |
| static const uint32_t ct[] = { /* Streaming PNG: 16-entry nibble CRC */ | |
| 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, |
OlderNewer