Documentation
¶
Overview ¶
Copyright © 2024 Achno <EMAIL ADDRESS>
Copyright © 2025 NAME HERE <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 © 2025 Achno <EMAIL ADDRESS>
Copyright © 2024 Achno <EMAIL ADDRESS>
Copyright © 2024 Achnologia <EMAIL ADDRESS>
Copyright © 2024 Achno <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
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, cmd) 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]) }, }
var (
BorderThickness int
)
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, cmd) 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]) }, }
var ScaleFactor float64
Functions ¶
func BuildCompressCmd ¶ added in v0.2.2
func BuildOCRCmd ¶ added in v0.2.2
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 LoadOCRConfig ¶ added in v0.2.2
(1) Loads default config (2) Merges the schema file if the schema flag is set and overrides the fields that are set (3) Overwrites the config with the flags if they are set
func RunCompressCmd ¶ added in v0.2.2
Types ¶
This section is empty.