Skip to content

Latest commit

 

History

History
110 lines (94 loc) · 4.52 KB

README.md

File metadata and controls

110 lines (94 loc) · 4.52 KB

gina - Go Image 'N' Assistance

Image

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

How to install / build

Use go install

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

Build gina

$ git clone [email protected]:nao1215/imaging.git
$ cd imaging
$ make build

How to use

Available subcommands

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

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
srcImage dstImage

Blur subcommand

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
srcImage dstImage

Sharpen subcommand

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
srcImage dstImage

Contrast subcommand

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
srcImage dstImage

Gamma subcommand

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
srcImage dstImage

LICENSE

gina command

The gina command is licensed under the MIT License.

Illustration

This readme use the illustration of Go gopher.