- grayscale FLAG -g
- sepia FLAG -s
- reflect (horizontal mirror) FLAG -r
- blur (box blur) FLAG -b
$ make filter
$ ./filter -g images/yard.bmp out.bmp
$ ./filter -s images/yard.bmp out.bmp
$ ./filter -r images/yard.bmp out.bmp
$ ./filter -b images/yard.bmp out.bmp
Some of my own notes, while watching Week4 lecture video
In C: A string has same address as address of its first char (since we already know its ending @ \0 or bx0000-0000 or 0x00 or null)
NOTE: string comparison: s1 == s2 (actually comparing address pointer. This is the same as &s1 == &s2)
In C, we can allocate memory, with malloc (from <stdlib.h>).
Dont forget: NULL checking, and free (return memory space) after use.
MEMORY SPACE:
• malloc: allocate space in heap
functions: work with space in stack