README: Added Prerequisites, more installation steps, updated
description, added Types, updated example
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# LibIMG
|
# LibIMG
|
||||||
|
|
||||||
_A "powerful" library that I have worked on allowing you to take a PPM image and apply filters and transformations and download the file. It also works for JPEG which you can also convert to PPM and vice versa_
|
_A lightweight, fast, and minimal library designed to be powerful for my current capabilities. This is a hobby project to learn bit operations and expanded to a full processor between two types --- PPM and JPEG. It's powerful for what it is and it is weak for what it could be._
|
||||||
|
|
||||||
> [Note]
|
> [Note]
|
||||||
> 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.
|
||||||
@@ -8,9 +8,36 @@ _A "powerful" library that I have worked on allowing you to take a PPM image and
|
|||||||
> [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
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Types
|
||||||
|
|
||||||
|
Available
|
||||||
|
|
||||||
|
1. PPM (Originally just to learn with)
|
||||||
|
2. JPEG (Added as having only PPM felt wrong)
|
||||||
|
|
||||||
|
Planned
|
||||||
|
|
||||||
|
3. PNG (Planned)
|
||||||
|
4. SVG (We Shall See)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
_You can pull libimg through FetchContent in your ```CMakeLists.txt```:_
|
You can build manually or pull it into a project
|
||||||
|
|
||||||
|
_To Build_:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.moomancer.xyz/DarthMooMancer/libimg.git
|
||||||
|
cd libimg
|
||||||
|
cmake -S . -B build && cmake --build build
|
||||||
|
./build/libimg
|
||||||
|
```
|
||||||
|
|
||||||
|
_To pull, use FetchContent in your ```CMakeLists.txt```:_
|
||||||
|
|
||||||
|
|
||||||
```Make
|
```Make
|
||||||
@@ -33,6 +60,15 @@ _White it is not an extensive example, it shows many of the many logic of how to
|
|||||||
* Keep in mind any function that creates a new buffer and returns it can
|
* Keep in mind any function that creates a new buffer and returns it can
|
||||||
* overwrite the old one, however it is lost. SO create a new variable and free
|
* overwrite the old one, however it is lost. SO create a new variable and free
|
||||||
* the old one after use.
|
* the old one after use.
|
||||||
|
*
|
||||||
|
* Functions (Specifically filters) that return unsigned int (not pointers) need
|
||||||
|
* to be used as an input to the same point in a buffer.
|
||||||
|
*
|
||||||
|
* For example:
|
||||||
|
*
|
||||||
|
* buf[i] = u32_grayscale(buf[i]);
|
||||||
|
*
|
||||||
|
* The buf[i] is replaced by the output of grayscale at buf[i]
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user