Skip to content

Vertina174/Image_viwer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Viewer (SDL3 - C++)

📌 Project Description

This is a simple image viewer application written in C++. The project uses SDL3 (Simple DirectMedia Layer 3) to render images in a window.

This is my first small graphics-based project, built to understand:

  • Basic SDL3 window creation
  • Rendering images
  • Handling external libraries in C++
  • Compiling with MinGW (MSYS2)

The project currently supports PPM image format only. Support for additional formats (PNG, JPG, etc.) will be added in future updates.


🛠 Technologies Used

  • C++
  • SDL3
  • MSYS2 MinGW64 (Recommended compiler environment)

📂 Project Structure

src/                → SDL3 include and library files
Image_viwer.cpp     → Main source file
image1.ppm          → Sample test image
SDL3.dll            → Required runtime library

⚙️ Requirements

  • MSYS2 installed
  • MinGW64 environment
  • SDL3 development libraries

Recommended terminal:

MSYS2 MinGW64

▶️ How to Compile

Run the following command inside the project directory:

g++ Image_viwer.cpp -o Image_viwer.exe -I src/include -L src/lib -lsdl3

▶️ How to Run

After successful compilation:

./Image_viwer.exe

Make sure:

  • SDL3.dll is present in the same directory as the executable.
  • The image file path is manually specified inside the source code.

⚠️ Important Notes

  1. The image file must be manually opened inside the source code.
  2. Only .ppm image format is currently supported.
  3. Incorrect file paths may cause the program to fail.
  4. Other image formats will be supported in future versions.

🎯 Project Level

This project is suitable for:

  • Beginner to Early-Intermediate C++ learners
  • Students learning graphics programming
  • Anyone exploring SDL for the first time

🚀 Future Improvements

  • Support for PNG and JPG formats
  • File selection via command line argument
  • Basic zoom functionality
  • Image resizing
  • Error handling improvements

👨‍💻 Author

Created as a learning project to understand SDL3 and graphics programming in C++.

About

Lightweight SDL3-based image viewer in C++ supporting PPM format (learning project).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors