Little tool to convert any image (JPEG, PNG, BMP, PSD, TGA, GIF, HDR, PIC, PNM) image to PNM. I made this project to practice my C skills and to learn how images works.
-
Custom image input support
- JPEG
- PNG
- BMP
- PSD
- TGA
- GIF
- HDR
- PIC
- PNM
-
Custom PNM output support
- PBM
- PGM
- PPM
# build
$ make
# build using shell script
$ ./build.sh
# run
$ cd build
$ ./img2pnm <args>
Print usage (exits with code 0)
$ ./img2pnm -h
Usage: build/img2pnm <input image> [-o[utput] output path] [-h[elp]]
Convert input.png
to input.png.ppm
$ ./img2pnm input.png
Convert input.jpg
to output.ppm
$ ./img2pnm input.jpg -o output.ppm