imageio

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStdoutOutput

func IsStdoutOutput(flags config.GlobalSubCommandFlags, args []string) bool

IsStdoutOutput checks if the output destination indicates stdout

Types

type FileReader

type FileReader struct {
	Path string
}

func GetImagesFromDirectoryRecursively

func GetImagesFromDirectoryRecursively(path string) ([]FileReader, error)

func (FileReader) Open

func (fr FileReader) Open() (*os.File, error)

func (FileReader) String

func (fr FileReader) String() string

type FileWriter

type FileWriter struct {
	Path string
}

func (FileWriter) Create

func (fw FileWriter) Create() (*os.File, error)

func (FileWriter) String

func (fw FileWriter) String() string

type ImageIO

type ImageIO struct {
	ImageInput  ImageReader
	ImageOutput ImageWriter
	Format      string
}

func DetermineImageOperations

func DetermineImageOperations(flags config.GlobalSubCommandFlags, args []string) ([]ImageIO, error)

DetermineImageOperations generates ImageIO structs based on program flags and command io arguments.

func SingleIO

func SingleIO(flags config.GlobalSubCommandFlags, args []string) ([]ImageIO, error)

SingleIO handles both file and STDIN input cases

type ImageReader

type ImageReader interface {
	Open() (*os.File, error)
	String() string
}

Input image abstraction

type ImageWriter

type ImageWriter interface {
	Create() (*os.File, error)
	String() string
}

Ouput image abstraction

type Stdin

type Stdin struct{}

func (Stdin) Open

func (ss Stdin) Open() (*os.File, error)

func (Stdin) String

func (ss Stdin) String() string

type Stdout

type Stdout struct{}

func (Stdout) Create

func (so Stdout) Create() (*os.File, error)

func (Stdout) String

func (so Stdout) String() string

Jump to

Keyboard shortcuts

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