README: Fixed many spelling problems and little nitpick things.

This commit is contained in:
2026-09-10 02:52:53 -04:00
parent 328648f57f
commit 8ed07bf8db
+9 -8
View File
@@ -6,11 +6,12 @@ _A lightweight, fast, and minimal library designed to be powerful for my current
> All documentation is in the code and files itself. So to save myself time I would recommend going through the code itself. > All documentation is in the code and files itself. So to save myself time I would recommend going through the code itself.
> [Warning] > [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. > 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.
## Prerequisites ## Prerequisites
This library does require _```libturbojpeg```_ as manually writing the functions for JPEG would take a long time to figure out and I may come back to do later. 1. This library does require _```libturbojpeg```_ as manually writing the functions for JPEG would take a long time to figure out and I may come back to do later.
2. ```C23 and CMake 4.4.3```, as there are some new features from it. Tested only on my M1 Macbook for compatibility.
## Types ## Types
@@ -48,12 +49,12 @@ FetchContent_Declare(imgproc
GIT_SHALLOW TRUE GIT_SHALLOW TRUE
) )
FetchContent_MakeAvailable(imgproc) FetchContent_MakeAvailable(imgproc)
target_link_libraries(libgl PRIVATE imgproc) target_link_libraries(<project> PRIVATE imgproc)
``` ```
## Example ## Example
_White it is not an extensive example, it shows many of the many logic of how to use all functions throughout the codebase._ _While it is not an extensive example, it shows many of the patterns for how to use all functions throughout the codebase._
```c ```c
/* /*
@@ -83,7 +84,7 @@ main()
// Load the PPM image // Load the PPM image
unsigned int* buf = ppm_load(img.name, &img); unsigned int* buf = ppm_load(img.name, &img);
// Check for null image load. In case image doesnt exist or fails to // Check for null image load. In case image doesn't exist or fails to
// load // load
if (!buf) if (!buf)
{ {
@@ -99,7 +100,7 @@ main()
// can take a lot of memory so better to clear anyways. // can take a lot of memory so better to clear anyways.
free(buf); free(buf);
// Check for null image load. In case image doesnt exist or fails to // Check for null image load. In case image doesn't exist or fails to
// load // load
if (!blur) if (!blur)
{ {
@@ -113,10 +114,10 @@ main()
blur[i] = u32_rotl(blur[i], 4); blur[i] = u32_rotl(blur[i], 4);
} }
// Take the attributes from ppm image so jpeg file can be saved // Take the attributes from ppm image so JPEG file can be saved
jimg = inherit_from_ppm(&img); jimg = inherit_from_ppm(&img);
// Saves jpeg to location specified // Saves JPEG to location specified
jpeg_save(blur, &jimg, "../assets/test_2_new.jpg"); jpeg_save(blur, &jimg, "../assets/test_2_new.jpg");
// Make sure to free any buffer still active // Make sure to free any buffer still active