1
0

resize picture based on specified dimensions

This commit is contained in:
2022-05-01 15:33:55 +02:00
parent b0e7cbbd2f
commit 1138d11923
3 changed files with 59 additions and 7 deletions

View File

@ -13,8 +13,12 @@ func main() {
flag.StringVar(&ConfigRegister.OutputDir, "output", "./", "Output directory")
flag.StringVar(&ConfigRegister.InputDir, "input", "/home/gator/Photos", "Input directory. Where to look the images from")
flag.StringVar(&ConfigRegister.BaseImage, "base-img", "", "Path to the base image to work with. Random image if not set")
flag.StringVar(&ConfigRegister.Dimensions, "dimensions", "800x600", "Out image dimensions. <width>x<height>")
flag.Parse()
// set output's width and height
ConfigRegister.SetOutputDimensions()
// get two random images and load them
var img1 image.Image
if ConfigRegister.BaseImage != "" {