Documentation ¶
Index ¶
- type Transform
- func (t *Transform) ConstrainContentHeight(aspectRatio float64)
- func (t *Transform) ConstrainContentWidth(aspectRatio float64)
- func (t *Transform) ConstrainHeight(aspectRatio float64)
- func (t *Transform) ConstrainWidth(aspectRatio float64)
- func (t *Transform) Reset(contentAttributes *image.ContentAttributes) error
- func (t *Transform) Validate(validator structure.Validator)
- type Transformer
- type TransformerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transform ¶
type Transform struct { Rendition image.Rendition `json:"rendition,omitempty"` ContentWidth int `json:"contentWidth,omitempty"` ContentHeight int `json:"contentHeight,omitempty"` Resize bool `json:"resize,omitempty"` Crop bool `json:"crop,omitempty"` }
func NewTransform ¶
func NewTransform() *Transform
func (*Transform) ConstrainContentHeight ¶
func (*Transform) ConstrainContentWidth ¶
func (*Transform) ConstrainHeight ¶
func (*Transform) ConstrainWidth ¶
type Transformer ¶
type TransformerImpl ¶
type TransformerImpl struct{}
func NewTransformer ¶
func NewTransformer() *TransformerImpl
func (*TransformerImpl) CalculateTransform ¶
func (t *TransformerImpl) CalculateTransform(contentAttributes *image.ContentAttributes, rendition *image.Rendition) (*Transform, error)
func (*TransformerImpl) TransformContent ¶
func (t *TransformerImpl) TransformContent(reader io.Reader, transform *Transform) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.