Documentation ¶
Index ¶
- func DitherImage(im Image) error
- func GolangImageToBytes(goimg image.Image, content_type string) ([]byte, error)
- func GolangImageToIIIFImage(goimg image.Image, im Image) error
- func IIIFImageToGolangImage(im Image) (image.Image, error)
- func PrimitiveImage(im Image, opts PrimitiveOptions) error
- type Dimensions
- type FormatInstruction
- type GolangImageDimensions
- type Image
- type PrimitiveOptions
- type RegionInstruction
- type RotationInstruction
- type SizeInstruction
- type Transformation
- func (t *Transformation) FormatInstructions(im Image) (*FormatInstruction, error)
- func (t *Transformation) HasTransformation() bool
- func (t *Transformation) RegionInstructions(im Image) (*RegionInstruction, error)
- func (t *Transformation) RotationInstructions(im Image) (*RotationInstruction, error)
- func (t *Transformation) SizeInstructions(im Image) (*SizeInstruction, error)
- func (t *Transformation) ToURI(id string) (string, error)
- type VIPSDimensions
- type VIPSImage
- func (im *VIPSImage) Body() []byte
- func (im *VIPSImage) ContentType() string
- func (im *VIPSImage) Dimensions() (Dimensions, error)
- func (im *VIPSImage) Format() string
- func (im *VIPSImage) Identifier() string
- func (im *VIPSImage) Rename(id string) error
- func (im *VIPSImage) Transform(t *Transformation) error
- func (im *VIPSImage) Update(body []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DitherImage ¶
func GolangImageToBytes ¶
func PrimitiveImage ¶
func PrimitiveImage(im Image, opts PrimitiveOptions) error
Types ¶
type Dimensions ¶
type FormatInstruction ¶
type FormatInstruction struct {
Format string
}
type GolangImageDimensions ¶
type GolangImageDimensions struct { Dimensions // contains filtered or unexported fields }
func (*GolangImageDimensions) Height ¶
func (dims *GolangImageDimensions) Height() int
func (*GolangImageDimensions) Width ¶
func (dims *GolangImageDimensions) Width() int
type Image ¶
type Image interface { Identifier() string Rename(string) error Transform(*Transformation) error // http://iiif.io/api/image/2.1/#order-of-implementation Update([]byte) error Body() []byte Format() string ContentType() string Dimensions() (Dimensions, error) }
func NewImageFromConfig ¶
func NewImageFromConfig(config *iiifconfig.Config, id string) (Image, error)
func NewImageFromConfigWithSource ¶
func NewImageFromConfigWithSource(config *iiifconfig.Config, source iiifsource.Source, id string) (Image, error)
type PrimitiveOptions ¶
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 Image) (*FormatInstruction, error)
func (*Transformation) HasTransformation ¶
func (t *Transformation) HasTransformation() bool
func (*Transformation) RegionInstructions ¶
func (t *Transformation) RegionInstructions(im Image) (*RegionInstruction, error)
func (*Transformation) RotationInstructions ¶
func (t *Transformation) RotationInstructions(im Image) (*RotationInstruction, error)
func (*Transformation) SizeInstructions ¶
func (t *Transformation) SizeInstructions(im Image) (*SizeInstruction, error)
type VIPSDimensions ¶
type VIPSDimensions struct { Dimensions // contains filtered or unexported fields }
func (*VIPSDimensions) Height ¶
func (d *VIPSDimensions) Height() int
func (*VIPSDimensions) Width ¶
func (d *VIPSDimensions) Width() int
type VIPSImage ¶
type VIPSImage struct { Image // contains filtered or unexported fields }
func NewVIPSImageFromConfigWithSource ¶
func NewVIPSImageFromConfigWithSource(config *iiifconfig.Config, src iiifsource.Source, id string) (*VIPSImage, error)
func (*VIPSImage) ContentType ¶
func (*VIPSImage) Dimensions ¶
func (im *VIPSImage) Dimensions() (Dimensions, error)
func (*VIPSImage) Identifier ¶
func (*VIPSImage) Transform ¶
func (im *VIPSImage) Transform(t *Transformation) error
Click to show internal directories.
Click to hide internal directories.