cmd

package
v0.0.0-...-83c7d1c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkWatermark

func BulkWatermark(srcFolder, watermarkFile, outputFolder string, opacity float64) error

BulkWatermark searches for image files in `srcFolder` and watermarks them all by overlaying each one with the image in `watermarkFile`, using the specified opacity. Watermarked images are then saved to `outputFolder`.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func WatermarkImage

func WatermarkImage(originalFile, watermarkFile, outputFile string, opacity float64) error

WatermarkImage overlays `watermarkFile` on top of `originalFile` with the specified `opacity` and saves the resulting image to `outputFile`.

Types

type FileImage

type FileImage struct {
	Name  string
	Image image.Image
}

FileImage represents an image file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL