Documentation
¶
Index ¶
- type EncodingOptions
- type FormatInstruction
- type Image
- type NativeImage
- type RegionInstruction
- type RotationInstruction
- type SizeInstruction
- type Transformation
- func (t *Transformation) FormatInstructions(im *NativeImage) (*FormatInstruction, error)
- func (t *Transformation) HasTransformation() bool
- func (t *Transformation) RegionInstructions(im *NativeImage) (*RegionInstruction, error)
- func (t *Transformation) RotationInstructions(im *NativeImage) (*RotationInstruction, error)
- func (t *Transformation) SizeInstructions(im *NativeImage) (*SizeInstruction, error)
- func (t *Transformation) ToURI(id string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncodingOptions ¶
type FormatInstruction ¶
type FormatInstruction struct {
Format string
}
type Image ¶
type Image interface {
Identifier() string
Transform(*Transformation) error // http://iiif.io/api/image/2.1/#order-of-implementation
//Format() string
Height() int
Width() int
}
type NativeImage ¶
type NativeImage struct {
Image
ID string
Bimg stdimage.Image
Config stdimage.Config
Format string
}
NativeImage ...
func NewNativeImage ¶
func NewNativeImage(id string, body []byte) (*NativeImage, error)
NewNativeImage ...
func (*NativeImage) Encode ¶
func (im *NativeImage) Encode(opts *EncodingOptions) ([]byte, error)
Identifier ...
func (*NativeImage) Transform ¶
func (im *NativeImage) Transform(t *Transformation) (*NativeImage, error)
type RegionInstruction ¶
type RotationInstruction ¶
type SizeInstruction ¶
type Transformation ¶
type Transformation struct {
Region string
Size string
Rotation string
Quality string
Format string
// contains filtered or unexported fields
}
func NewTransformation ¶
func (*Transformation) FormatInstructions ¶
func (t *Transformation) FormatInstructions(im *NativeImage) (*FormatInstruction, error)
func (*Transformation) HasTransformation ¶
func (t *Transformation) HasTransformation() bool
func (*Transformation) RegionInstructions ¶
func (t *Transformation) RegionInstructions(im *NativeImage) (*RegionInstruction, error)
func (*Transformation) RotationInstructions ¶
func (t *Transformation) RotationInstructions(im *NativeImage) (*RotationInstruction, error)
func (*Transformation) SizeInstructions ¶
func (t *Transformation) SizeInstructions(im *NativeImage) (*SizeInstruction, error)
Click to show internal directories.
Click to hide internal directories.