The gina command is a CLI tool for image processing. The gina was created to help developers understand 'how to use the image processing methods provided by the nao1215/imaging package'.
The gina aims to be a command with multiple subcommands, focusing on simple functionality rather than being a feature-rich command like ImageMagick.
The gina supports the following image formats:
- JPEG
- GIF
- PNG
- BMP
- TIFF
If you does not have the golang development environment installed on your system, please install golang from the golang official website.
$ go install github.com/nao1215/imaging/cmd/gina@latest
$ git clone [email protected]:nao1215/imaging.git
$ cd imaging
$ make build
Available Commands:
blur Blur the image according to sigma
bug-report Submit a bug report at GitHub
contrast Adjust the contrast of an image
gamma Adjust the gamma correction of an image
help Help about any command
resize Resize image
sharpen Sharpening the image
version Show imaging command version information
resize subcommand resizes the image specified argument and saves it to the file specified by the --output parameter. --output default value is 'output.jpg'.
If you specify either the height or width, the aspect ratio will be maintained during resizing. The file extension specified in the --output parameter can be different from the input image's extension.
$ gina resize --width 100 --output resize_awesome.png cmd/gina/img/awesome.png
save image: resize_awesome.png
Original image | Resize width=100 |
---|---|
The blur subcommand outputs an image with blur effect intensity according to the sigma value
$ gina blur --sigma 5.0 --output blur_awesome.png cmd/gina/img/awesome.png
save image: blur_awesome.png
Original image | Blur sigma=5.0 |
---|---|
The sharpen subcommand outputs an image with sharpening effect intensity according to the sigma value
$ gina sharpen --sigma 10.0 --output sharpen_awesome.png cmd/gina/img/awesome.png
save image: sharpen_awesome.png
Original image | Sharpen sigma=10.0 |
---|---|
The contrast subcommand outputs an image with adjusted contrast according to the percentage value. The percentage value is a value between -100 and 100.
$ gina contrast --percentage 40 --output contrast_awesome.png cmd/gina/img/awesome.png
save image: contrast_awesome.png
Original image | Adjust contrast percentage=40 |
---|---|
The gamma subcommand outputs an image with adjusted gamma according to the gamma value. The gamma value must be greater than 0.
$ gina gamma --gamma 0.1 --output gamma_awesome.png cmd/gina/img/awesome.png
save image: gamma_awesome.png
Original image | Adjust gamma=0.1 |
---|---|
The gina command is licensed under the MIT License.
- See LICENSE file.
- gina command does not exist original disintegration/imaging repository.
This readme use the illustration of Go gopher.
- The Go gopher was designed by Renée French. Illustrations by tottie.
- ©tottie / Renée French
- Ref. https://github.com/tottie000/GopherIllustrations