Documentation ¶
Index ¶
- Variables
- func OptBaseDir(dir string) func(*MergeImage)
- func OptGridSize(sizeX, sizeY int) func(*MergeImage)
- func OptGridSizeFromNthImageSize(n int) func(*MergeImage)
- func Register(filterType FilterType, filter Filter)
- type BlackAndWhiteFilter
- type Filter
- type FilterType
- type Grid
- type MergeImage
- type SepiaFilter
- type VignetteFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var Filters = make(map[FilterType]Filter)
Functions ¶
func OptBaseDir ¶
func OptBaseDir(dir string) func(*MergeImage)
OptBaseDir is an functional option to set the BaseDir field
func OptGridSize ¶
func OptGridSize(sizeX, sizeY int) func(*MergeImage)
OptGridSize is an functional option to set the GridSize X & Y
func OptGridSizeFromNthImageSize ¶
func OptGridSizeFromNthImageSize(n int) func(*MergeImage)
OptGridSizeFromNthImageSize is an functional option to set the GridSize from the nth image
func Register ¶ added in v0.3.1
func Register(filterType FilterType, filter Filter)
Types ¶
type BlackAndWhiteFilter ¶ added in v0.3.1
type BlackAndWhiteFilter struct{}
type Filter ¶ added in v0.3.1
Filter is the interface that wraps the Apply method.
func GetFilter ¶ added in v0.3.1
func GetFilter(filterType FilterType) Filter
type FilterType ¶ added in v0.3.1
type FilterType int
FilterType defines the type of filter to apply to the image.
const ( NoFilter FilterType = iota // BlackAndWhite applies a black and white filter. BlackAndWhite Vignette Sepia )
type Grid ¶ added in v0.2.0
type Grid struct { Image image.Image ImageFilePath string BackgroundColor color.Color OffsetX int OffsetY int Grids []*Grid Filters []FilterType }
Grid holds the data for each grid
type MergeImage ¶
type MergeImage struct { Grids []*Grid ImageCountDX int ImageCountDY int BaseDir string FixedGridSizeX int FixedGridSizeY int GridSizeMode gridSizeMode GridSizeFromNth int }
MergeImage is the struct that is responsible for merging the given images
func New ¶
func New(grids []*Grid, imageCountDX, imageCountDY int, opts ...func(*MergeImage)) *MergeImage
New returns a new *MergeImage instance
func (*MergeImage) Merge ¶
func (m *MergeImage) Merge() (*image.RGBA, error)
Merge reads the contents of the given file paths, merges them according to given configuration
func (*MergeImage) ReadImageFile ¶ added in v0.2.1
func (m *MergeImage) ReadImageFile(path string) (image.Image, error)
type SepiaFilter ¶ added in v0.3.1
type SepiaFilter struct{}
type VignetteFilter ¶ added in v0.3.1
type VignetteFilter struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.