Kalam is a simple, easy-to-use C++ library designed for handling basic image operations such as loading, saving, and viewing images. It aims to streamline the process of working with images by providing straightforward interfaces, allowing users to perform common tasks with minimal code and in easy way.
As a developer exploring the depths of C++, I often found that many existing libraries for image handling were either too complex or required heavy dependencies, making them difficult to integrate, especially for beginners.
Kalam
was born out of the need for a lightweight, minimalistic library that simplifies basic image operations without overwhelming the user.
The name "Kalam" has a special significance—it means "pen" in several languages, symbolizing creativity, expression, and the act of making ideas tangible. Just as a pen is a simple yet powerful tool that brings thoughts to life on paper, this library serves as a tool that simplifies and enables image handling in C++. Naming it Kalam
reflects the library’s aim: to be a creative, intuitive tool that empowers developers to handle images effortlessly.
- Load images in common formats like PNG and JPEG/JPG.
- Save images to disk in different formats.
- Display images directly using the default system viewer without saving.
- Cross-platform compatibility with Windows, macOS, and Linux.
- Easy integration with other libraries for further image processing.
cmake V(3.10 and above)
gcc and g++ capable of running c++ 20
boost library (only for windows)
Kalam supports both dynamic and static linking.
- Clone the Repository and Navigate:
git clone git@github.com:Aliqyan-21/kalam.h.git
cd kalam
- Build and Install:
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --install .
- Clone the Repository and Navigate:
git clone git@github.com:Aliqyan-21/kalam.h.git
cd kalam
- Build and Install:
mkdir build && cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cmake --install . --config Release
#include "image.h"
kalam::Image img;
if (img.load("path/to/image.png")) {
// Image loaded successfully
}
img.save("path/to/save/image.png");
img.show();
g++ main.cpp -o main -lkalam
./main
-
Image Class: Handles image data, providing load, save, and show functionalities.
-
Load and Save Modules: Implement loading and saving functions using the stb_image library.
-
Show Function: Displays images using the default system image viewer without requiring a save.
Feedback, ideas, and contributions will be appreciated that can help improve Kalam and inspire others. If you build something exciting with Kalam, consider sharing it with the community!
Kalam is an open-source project available under the MIT license. You are free to use, modify, and distribute the library as per the terms of the license.