Documentation
¶
Index ¶
- Constants
- Variables
- func NewActionB64Extract(contentType, targetMeta string) *models.Action
- func NewActionBlur(value float64) *models.Action
- func NewActionBrightness(value float64) *models.Action
- func NewActionContrast(value float64) *models.Action
- func NewActionExtractColors(value int64) *models.Action
- func NewActionFill(width, height int, anchor, filter string) *models.Action
- func NewActionFit(width, height int, filter string) *models.Action
- func NewActionGamma(value float64) *models.Action
- func NewActionResize(width, height int, filter string) *models.Action
- func NewActionSave(saves ...bool) *models.Action
- func NewActionSharpen(value float64) *models.Action
- func NewActionValidateSize(width, height, maxWidth, maxHeight int) *models.Action
- type Converter
- type ImageProcessor
- type ImageReader
Constants ¶
View Source
const ( ActionValidateSize = actionprocessors.ActionValidateSize ActionResize = actionprocessors.ActionResize ActionFit = actionprocessors.ActionFit ActionFill = actionprocessors.ActionFill ActionBlur = actionprocessors.ActionBlur ActionSharpen = actionprocessors.ActionSharpen ActionGamma = actionprocessors.ActionGamma ActionContrast = actionprocessors.ActionContrast ActionBrightness = actionprocessors.ActionBrightness ActionExtractColors = actionprocessors.ActionExtractColors ActionBase64 = actionprocessors.ActionBase64 ActionSave = actionprocessors.ActionSave )
Task Action list
View Source
const ( ActionParamValue = actionprocessors.ActionParamValue ActionParamWidth = actionprocessors.ActionParamWidth ActionParamHeight = actionprocessors.ActionParamHeight ActionParamMaxWidth = actionprocessors.ActionParamMaxWidth ActionParamMaxHeight = actionprocessors.ActionParamMaxHeight ActionParamAnchor = actionprocessors.ActionParamAnchor ActionParamFilter = actionprocessors.ActionParamFilter ActionParamB64Format = actionprocessors.ActionParamB64Format ActionParamMetaField = actionprocessors.ActionParamMetaField ActionParamSave = actionprocessors.ActionParamSave ActionParamJPEGQuality = actionprocessors.ActionParamJPEGQuality )
Action params...
Variables ¶
View Source
var ( ErrUnsupportedAction = errors.New("[image] unsupported action") ErrInvalidInputFile = errors.New("[image] invalid input file") )
Error list...
Functions ¶
func NewActionB64Extract ¶
NewActionB64Extract with target meta field
func NewActionBrightness ¶
NewActionBrightness with value
func NewActionContrast ¶
NewActionContrast with value
func NewActionExtractColors ¶
NewActionExtractColors with value
func NewActionFill ¶
NewActionFill with width and heigth
func NewActionFit ¶
NewActionFit with width and heigth
func NewActionResize ¶
NewActionResize with width and heigth
func NewActionSave ¶
NewActionSave object into the pipeline This action must be the last in the sequance, otherwhise it could be a problem
func NewActionSharpen ¶
NewActionSharpen with value
func NewActionValidateSize ¶
NewActionValidateSize with width and heigth
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter contains whole functions to convert image
func NewDefaultConverter ¶
func NewDefaultConverter() *Converter
NewDefaultConverter with all default actions
func (*Converter) Process ¶
func (ic *Converter) Process(in converters.Input, out converters.Output) error
Process input file
func (*Converter) RegisterImageProcessor ¶
func (ic *Converter) RegisterImageProcessor(processors ...ImageProcessor) *Converter
type ImageProcessor ¶
type ImageProcessor interface { Name() string Process(in converters.Input, out converters.Output, action *models.Action, imgReader ImageReader) error }
ImageProcessor basic processor interface
type ImageReader ¶
type ImageReader = actionprocessors.ImageReader
ImageReader basic image reading desctiption
Click to show internal directories.
Click to hide internal directories.