Compare commits
2 commits
59a007972e
...
f1ca83c973
Author | SHA1 | Date | |
---|---|---|---|
f1ca83c973 | |||
bc47c7c685 |
2 changed files with 33 additions and 14 deletions
22
README.md
Normal file
22
README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
1. Clone this repo:
|
||||
```
|
||||
git clone https://git.m724.eu/Minecon724/enhancer
|
||||
```
|
||||
2. Open `main.c` and take a look at the settings, defaults are fine
|
||||
3. Compile: (you must do this after every change of settings)
|
||||
```
|
||||
make
|
||||
```
|
||||
4. Done, you should see `enhancer` in the main directory
|
||||
|
||||
Usage:
|
||||
```
|
||||
./enhancer <input> <output>
|
||||
```
|
||||
|
||||
To build a debug binary: (you don't need this unless you do)
|
||||
```
|
||||
make debug
|
||||
```
|
||||
|
||||
Just so I don't forget, I wanted to *make* a *make* sure `make` is installed joke but I rearranged things and it doesn't fit (*make* sense)
|
25
main.c
25
main.c
|
@ -6,28 +6,25 @@
|
|||
#include "stb_image_write.h"
|
||||
|
||||
/*
|
||||
0 - simple
|
||||
balanced
|
||||
1 - nomin
|
||||
average of two largest channels, bias towards darker shades, use if unsure
|
||||
2 - nomax
|
||||
makes image brighter
|
||||
3 - twist
|
||||
results in a specific style. largest banding potential, reduce strength (2024 update I don't remember how I came up with that)
|
||||
0 - balanced
|
||||
1 - average of two largest channels, bias towards darker shades, use if unsure
|
||||
2 - makes image brighter
|
||||
3 - ??? (lots of banding so reduce strength)
|
||||
*/
|
||||
#define LUMINANCE_METHOD 1
|
||||
|
||||
/*
|
||||
less is more (literally). Accepts decimals.
|
||||
go below 1 = regret
|
||||
negative causes b&w (although it does not colorize already b&w images)
|
||||
0 crashes
|
||||
1 is the minimum, going below 1 makes surprising effects
|
||||
the higher value the less effect it has
|
||||
so when I say "reduce strength" I mean "increase the value"
|
||||
*/
|
||||
#define VIBRANCE_STRENGTH 1.1
|
||||
|
||||
/*
|
||||
this is to make things more natural but sometimes does the opposite so toggle if u get weird things (I have a fix in mind tho) (2024 update not anymore)
|
||||
basically darkens too bright things and vice versa
|
||||
if a pixel goes below 0% or above 100% basically subtract the difference
|
||||
so -10% becomes 10% and 110% becomes 90%
|
||||
this was supposed to fix clipping but messes up colors (I remember I had in mind a fix but I don't remember it)
|
||||
|
||||
uncomment to enable
|
||||
*/
|
||||
//#define BETTER_CLAMP
|
||||
|
|
Loading…
Reference in a new issue