https://github.com/bernhardfritz/blendmodes
This OpenGL-based tool allows you to perform basic image blending operations using the CLI.
https://github.com/bernhardfritz/blendmodes
blend-modes c cli command-line-tool glsl opengl shaders
Last synced: 10 months ago
JSON representation
This OpenGL-based tool allows you to perform basic image blending operations using the CLI.
- Host: GitHub
- URL: https://github.com/bernhardfritz/blendmodes
- Owner: bernhardfritz
- Created: 2017-11-08T00:10:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T00:26:29.000Z (over 8 years ago)
- Last Synced: 2025-07-07T02:05:33.185Z (12 months ago)
- Topics: blend-modes, c, cli, command-line-tool, glsl, opengl, shaders
- Language: C
- Homepage:
- Size: 1.18 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### blendmodes
This OpenGL-based tool allows you to perform basic image blending operations using the CLI. An OpenGL 2.0+ compatible graphics card is required for this tool to work. Systems without a graphics card are currently out of luck. However, software rendering mode is coming soon!
#### Requirements
* [glfw](http://www.glfw.org/)
#### Instructions
```
make
./bm backgroundFilename foregroundFilename outputFilename blendMode blendOpacity
```
**Example:** ```./bm lena.png baboon.png lenaAddBaboon.png 0 1.0```
| Background | Foreground | Output | Blend mode | Blend opacity |
|:------------------------------------:|:------------------------------------:|:------------------------------------:|-----------------|:-------------:|
|  |  |  | 0: add | 1.0 |
|  |  |  | 1: average | 1.0 |
|  |  |  | 2: colorBurn | 1.0 |
|  |  |  | 3: colorDodge | 1.0 |
|  |  |  | 4: darken | 1.0 |
|  |  |  | 5: difference | 1.0 |
|  |  |  | 6: exclusion | 1.0 |
|  |  |  | 7: glow | 1.0 |
|  |  |  | 8: hardLight | 1.0 |
|  |  |  | 9: hardMix | 1.0 |
|  |  |  | 10: lighten | 1.0 |
|  |  |  | 11: linearBurn | 1.0 |
|  |  |  | 12: linearDodge | 1.0 |
|  |  |  | 13: linearLight | 1.0 |
|  |  |  | 14: multiply | 1.0 |
|  |  |  | 15: negation | 1.0 |
|  |  |  | 16: normal | 1.0 |
|  |  |  | 17: overlay | 1.0 |
|  |  |  | 18: phoenix | 1.0 |
|  |  |  | 19: pinLight | 1.0 |
|  |  |  | 20: reflect | 1.0 |
|  |  |  | 21: screen | 1.0 |
|  |  |  | 22: softLight | 1.0 |
|  |  |  | 23: subtract | 1.0 |
|  |  |  | 24: vividLight | 1.0 |
**Supported image types**:
* png
* bmp
* tga
* jpg
**Supported platforms**:
* Windows (Makefile coming soon!)
* Linux (Makefile coming soon!)
* macOSX
#### Credits
* Shaders inspired by [glsl-blend](https://github.com/jamieowen/glsl-blend)
* Sean T. Barrett for his fantastic C library [stb](https://github.com/nothings/stb)
#### TODO
* Adapt Makefile for Windows and Linux
* Allow to set x and y offsets for foreground and background using CLI parameters
* Write man page
* Add support for software rendering mode