https://github.com/mubinmuhammad/zinc
An Image Processor. Written in C.
https://github.com/mubinmuhammad/zinc
c graphics image-processing
Last synced: over 1 year ago
JSON representation
An Image Processor. Written in C.
- Host: GitHub
- URL: https://github.com/mubinmuhammad/zinc
- Owner: MubinMuhammad
- License: mit
- Created: 2023-08-21T06:16:30.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-26T07:10:51.000Z (over 1 year ago)
- Last Synced: 2025-01-26T08:18:55.522Z (over 1 year ago)
- Topics: c, graphics, image-processing
- Language: C++
- Homepage:
- Size: 15.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Zinc, an image processor written in C
## Supported Effects
- GrayScale
- Avarage
- Luminosity
- Lightness
- Brightness adjustment
- Tinting
- Inverting colors
- Cropping
- Without changing the resolution
- Changing the resolution
## Building
If you are using Windows you do have to use mingw32 or mingw64. On Mac & Linux you should install the "gcc" package. Then you can run:
```bash
$ make # exe will be generated in the projects root directory.
$ make install # if you would like it to be globally accessible.
$ make uninstall # uninstall zinc.
```
## Usage
run `./zinc --help` for more information. For ease of use here is the output:
```
Pattern:
for Linux & Mac:
./zinc [Options] [Image]
for Windows:
zinc [Options] [Image]
Note:
You have to give the parameters after function call.
You neigther have to put <> brackets nor commas when or is specified.
Just put values and spaces between the parameters.
Example: 0.43 0.654 0.12 (r,g,b example)
425 645 (x,y example).
Lastly I used factors instead of percentages. As it's more accurate.
Example: for brightness, setting factor to 2.0 will double the brightness.
for tinting, changing the r value to 1.5 will increase half of the red value.
Options:
-v, --version check the version of zinc.
-h, --help show this help message.
-o, --output choose a name for the output file.
-g, --gray turn an image gray.
-gl, --gray-lumin turn the image gray with rgb values that fits human eyes.
-gli, --gray-light turn the image gray with min,max values.
-ti, --tint tint the image with the values.
-br, --brightness change the brightness depending on the percentage.
-in --invert invert the colors of the image.
-cwctr, --cropwctr crop the image without changing the resolution.
x1,y1 = top left coordinate. x2,y2 = bottom right coordinate.
r,g,b = color for the uncropped areas.
-cctr, --cropctr crop the image and change the resolution.
x1,y1 = top left coordinate.
x2,y2 = bottom right coordinate.
-th, --threshold turns the image black and white depending on the threshold.
ranges from 0 to 255.
```