OpenIPL(Open Image Processing Library) is a C library for image processing.
OpenIPL provides various functions for working with images, such as converting to grayscale, black and white images, adjusting brightness and contrast, applying filters, and more.
../OpenIPL/
├── README.md
├── LICENSE
├── CMakeLists.txt
├── scripts/
├ ├── tests.c
├ └── build.py
└── src/
└── operations/
-
Clone the repository:
git clone 'https://github.com/LincolnCox29/OpenIPL' cd <repo-directory>
-
Create a build directory:
mkdir build cd build -
Run CMake to generate build files:
cmake -DCMAKE_BUILD_TYPE=Release ..
-
Build the project:
cmake --build . --config Release
For convenience, you can use the provided Python script to automate the entire build process:
-
Clone the repository:
git clone 'https://github.com/LincolnCox29/OpenIPL' cd <repo-directory>
-
Make sure Python is installed on your system. If it’s not, you can download it here.
-
Simply run the script:
python OpenIPL/scripts/build.py
This script will:
- Create the build directory.
- Configure the project with CMake.
- Build the project in Release mode.
After building, the compiled static library OpenIPL.lib will be located in the lib directory.
To use the library in your project, include the header file OpenIPL.h and compile with OpenIPL.lib.
Example usage:
#include "OpenIPL.h"
#include <stdio.h>
#define printError(errPtr) (printf("ERR --> CODE: %d MSG: %s\n", (errPtr)->code, (errPtr)->message))
int main()
{
OIPL_ErrorInfo err;
OIPL_Img* img = OIPL_imgLoad("src.png");
err = OIPL_ChromaticAberration(img, 3, 3, -3, -3, 0.5);
if (err.code)
{
OIPL_imgFree(img);
printError(&err);
return err.code;
}
err = OIPL_imgWrite("out.png", img);
OIPL_imgFree(img);
if (err.code)
{
printError(&err);
return err.code;
}
return 0;
}Examples and instructions can be found here: DOCS
OpenIPL is released under the MIT license, allowing free use in both commercial and non-commercial projects.