Documentation ¶
Index ¶
- func ApplyCustomTransformations(t *Transformation, im Image) error
- func CrispImage(im Image, opts *CrispImageOptions) error
- 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 CrispImageOptions
- type Dimensions
- type FormatInstruction
- 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) SizeInstructionsWithDimensions(im Image, width int, height int) (*SizeInstruction, error)
- func (t *Transformation) ToURI(id string) (string, error)
- func (t *Transformation) Tranform(im Image) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCustomTransformations ¶
func ApplyCustomTransformations(t *Transformation, im Image) error
Apply non-standard transformations to a go-iiif/image.Image instance.
func CrispImage ¶
func CrispImage(im Image, opts *CrispImageOptions) error
func DitherImage ¶
func GolangImageToBytes ¶
Encode a Go language image.Image instance to a byte array.
func GolangImageToIIIFImage ¶
Assign a Go language image.Image instance to a go-iiif/image.Image instance.
func IIIFImageToGolangImage ¶
Convert a go-iiif/image.Image instance to a Go language image.Image instance.
func PrimitiveImage ¶
func PrimitiveImage(im Image, opts PrimitiveOptions) error
Types ¶
type CrispImageOptions ¶
func DefaultCrispImageOptions ¶
func DefaultCrispImageOptions() *CrispImageOptions
type Dimensions ¶
type FormatInstruction ¶
type FormatInstruction struct {
Format string
}
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) }
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 NewTransformation(compliance iiifcompliance.Compliance, region string, size string, rotation string, quality string, format string) (*Transformation, error)
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)
func (*Transformation) SizeInstructionsWithDimensions ¶
func (t *Transformation) SizeInstructionsWithDimensions(im Image, width int, height int) (*SizeInstruction, error)
func (*Transformation) Tranform ¶
func (t *Transformation) Tranform(im Image) error
Click to show internal directories.
Click to hide internal directories.