Image processing in C — starter example

1. Compile (Linux / WSL with GCC):
   gcc -std=c11 -Wall -Wextra -O2 image_demo.c -o image_demo -lm
2. Run:
   ./image_demo sample.ppm grayscale.pgm edges.pgm

macOS: use clang in place of gcc.
Windows / MinGW: use -o image_demo.exe, then in PowerShell:
   .\image_demo.exe sample.ppm grayscale.pgm edges.pgm

Input: binary PPM (P6), maximum value 255, dimensions up to 4096 x 4096.
Output: binary PGM (P5). Existing output files are replaced.
Use different paths for the input and both outputs.
The outer border of the Sobel output is black.

Expected output files and PNG previews are included.
PNG previews are convenient for browsers; the C program reads PPM and writes PGM.
The synthetic sample image was made for this lesson. No third-party image is needed.

Tutorial: https://c-lang-learning.com/en/image-processing.html
