Documentation
¶
Overview ¶
Copyright © 2024 Achno <EMAIL ADDRESS>
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2024 Achno <EMAIL ADDRESS>
Copyright © 2025 Achno <EMAIL ADDRESS>
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2025 Achno ¶
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2024 Achno <EMAIL ADDRESS>
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2024 Achno <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BorderCmd = &cobra.Command{ Use: "border [PATH] [OPTIONAL OUTPUT]", Short: "draw a border with a specified color and thickness on the image", PreRunE: func(cmd *cobra.Command, args []string) error { err := validateInput(shared, args) if err != nil { return err } return nil }, Run: func(cmd *cobra.Command, args []string) { hex, err := cmd.Flags().GetString("color") utils.HandleError(err, "Error") clr, err := image.HexToRGBA(hex) utils.HandleError(err, "Error") processor := &image.BorderProcessor{ Color: clr, BorderThickness: BorderThickness, } imageOps, err := imageio.DetermineImageOperations(shared, args) utils.HandleError(err) logger.Print("Processing images...") processedImages, err := image.ProcessImgs(processor, imageOps, theme) utils.HandleError(err, "Error") if err != nil { logger.Error(err, "The following images had errors while processing") } openImageInViewer(shared, args, processedImages[0]) }, }
View Source
var (
BorderThickness int
)
View Source
var GridCmd = &cobra.Command{ Use: "grid [PATH] [OPTIONAL OUTPUT]", Short: "draw a grid with a specific size,color and thickness on the image", PreRunE: func(cmd *cobra.Command, args []string) error { err := validateInput(shared, args) if err != nil { return err } return nil }, Run: func(cmd *cobra.Command, args []string) { imageOps, err := imageio.DetermineImageOperations(shared, args) utils.HandleError(err) logger.Print("Processing images...") processor := &image.GridProcessor{} processor.SetGridOptions( image.WithGridSize(gridSize), image.WithGridColor(gridColor), image.WithGridThickness(gridThickness), image.WithMaskonly(gridMask), ) processedImages, err := image.ProcessImgs(processor, imageOps, theme) utils.HandleError(err, "Error") if err != nil { logger.Error(err, "The following images had errors while processing") } openImageInViewer(shared, args, processedImages[0]) }, }
View Source
var ScaleFactor float64
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.