Skip to content

About

image viewer for ppm6 format using SDL2 library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

PPM Image Viewer (SDL2)

A minimal image viewer that reads PPM (P6) images from stdin and displays them using SDL2.
Built to stay close to the metal: raw file parsing, manual buffers, no image libraries.


Supported Format

  • PPM P6 (binary)
  • maxval = 255 only

Recommended Image Size / Ratio

PPM itself has no fixed or recommended aspect ratio — it’s just raw pixels.
That said, for sanity and performance:

  • Recommended resolution: 800×600 or 640×480
  • Aspect ratio: 4:3 or 16:9
  • Avoid extremely large images (PPM is uncompressed and memory-heavy)

Best rule:
👉 Use a resolution that comfortably fits on screen and matches your SDL window.


Setup & Build

Compile using SDL2:

gcc -o main main.c `sdl2-config --cflags --libs`

Then run :

cat image.ppm | ./main

About

image viewer for ppm6 format using SDL2 library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages