From d2557b84cf79930ed9fd1b3edc16c0c3d29e06dd Mon Sep 17 00:00:00 2001 From: Andrew Haynes Date: Wed, 9 Sep 2026 17:21:48 -0400 Subject: [PATCH] README: Updated to show pulling the project as dependency to other projects --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bcb8058..ac29e2a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,25 @@ _A "powerful" library that I have worked on allowing you to take a PPM image and > [Warning] > There are a lot of changes you can make to an image but this is not an extensive library to use mainstream. I would hope you understood that already. This Is for a self made project learning bitwise for c originally and now has become bigger and cooler than expected. -### Example +## Installation + +_You can pull libimg through FetchContent in your ```CMakeLists.txt```:_ + + +```Make +include(FetchContent) +FetchContent_Declare(imgproc + GIT_REPOSITORY https://git.moomancer.xyz/DarthMooMancer/libimg.git + GIT_TAG main + GIT_SHALLOW TRUE +) +FetchContent_MakeAvailable(imgproc) +target_link_libraries(libgl PRIVATE imgproc) +``` + +## Example + +_White it is not an extensive example, it shows many of the many logic of how to use all functions throughout the codebase._ ```c /* @@ -36,6 +54,7 @@ main() LOGERROR(ERR_BUF_NULL); return ERR_BUF_NULL; } + // Blur image and save to new pointer unsigned int* blur = box_blur(buf, &img, 20); @@ -43,6 +62,7 @@ main() // ending or possibly leaking. Also it stays in heap and a large image // can take a lot of memory so better to clear anyways. free(buf); + // Check for null image load. In case image doesnt exist or fails to // load if (!blur)