https://github.com/zzwx/gamutmask
Gamut mask tools implemented in golang
https://github.com/zzwx/gamutmask
gamut golang image-processing
Last synced: 6 months ago
JSON representation
Gamut mask tools implemented in golang
- Host: GitHub
- URL: https://github.com/zzwx/gamutmask
- Owner: zzwx
- License: mit
- Created: 2017-12-17T03:03:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-09T00:54:34.000Z (over 6 years ago)
- Last Synced: 2024-12-29T13:39:39.925Z (over 1 year ago)
- Topics: gamut, golang, image-processing
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gamut Mask Tools
## Purpose
Generating gamutmask images from existing image files like this (width/height=250, paddingX/paddingY=2)

> Van Gogh Starry Night
Gamutmask tool once executed generates gamutmask images for every image found in the `input` folder. By default it runs until stopped thus monitoring for updated or added files.
To run only once:
```
$ gamutmask -once
```
To run recursively:
```
$ gamutmask -recursive
```
To modify output folder by passing ``-output`` parameter:
```
$ gamutmask -output ./output
```
The tool monitors the `./_input` folder for images unless requested to do it `once`. The folder can also be changed by passing a value for `-intput` parameter:
```
$ gamutmask -input ./input
```
For help issue
```
$ gamutmask help
```
Command line also supports the following parameters:
* `width`
* `height`
* `paddingX`
* `paddingY`
## Full Help
```
-height int
Height of the resulting gamut image (default 250)
-help
Print this help
-input string
Folder name where input files are located (default "./_input")
-monitor
Monitor input folder for new and updated files (default true)
-once
Shortuct to monitor=false
-output string
Folder name where output files should be saved (default "./_output")
-paddingX int
Widgth of the resulting gamut image (default 2)
-paddingY int
Widgth of the resulting gamut image (default 2)
-recursive
Walk all subfolders of the input folder too recursively
-width int
Widgth of the resulting gamut image (default 250)
```
## Usage as a Library
One can `/lib` submodule containing the core function itself inside their own project:
```
func GenerateGamutMask(img image.Image, maskWidth, maskHeight int) (wheel *image.RGBA64)
```
as well as `ProcessChangedFilesOnly` function in order to process sets of files some different way.
## Requirement
* go 1.13 (for error unwrapping)
## To Build and Install From Source
To resolve dependency tree, simply:
```
$ go mod verify
$ go build
```
To install to golang path bin:
```
$ go install
```