This is a creation in Article, where the information may have evolved or changed.
I. Overview of PPGO_CLIIMG
Ppgo_cliimg is a picture interception processing tool, based on the Golang language implementation of the Image Interception processing tool.
You can cut out images that are white or other solid colors and output according to custom dimensions and margins.
Effect similar to another Python project: https://github.com/george518/CoreImage
Ii. What is the use of ppgo_cliimg?
1. Quickly cut the core of the image and customize the size and margins to create new images
2, commonly used in e-commerce platform Picture batch processing.
3, contains the Golang commonly used picture package use method, may use as the Golang Picture study reference
Three, ppgo_cliimg the picture effect of the interception
Original image (for easy viewing, here the basemap color is light green?) ):
Intercept a height of 200px, width 300px, the margin is 10px, the position is centered picture as follows:
Iv. How to install
1. Download
Go get github.com/george518/ppgo_clipimg
2. Operation
Go Build
V. How to use
Examples of Use:
./ppgo_clipimg-f=./example/images/image.jpg-p=center-h=300-w=200-m=10
Parameter interpretation
Flag needs an argument:-husage of./ppgo_clipimg:-F string Picture address or Picture folder address-h int new picture height (default)-M int Edge From (default)-P string top|bottom|left|right|center (default "center")-W int new picture width (default 300)
You can also use the./ppgo_cliimg-h to view incoming parameters
Vi. Address of GitHub
Https://github.com/george518/PPGo_ClipImg
603 reads ∙2 likes