Documentation ¶
Index ¶
- func ExtensionToType(name string) bimg.ImageType
- func ExtractImageTypeFromMime(mime string) string
- func GetImageMimeType(code bimg.ImageType) string
- func IsFormatSupported(format string) bool
- func IsImageMimeTypeSupported(mime string) bool
- type CropType
- type FilterType
- type FitType
- type Image
- type MockProcessor
- type OptionParser
- type Options
- type Processor
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtensionToType ¶
ExtensionToType returns the image type based on the given image type alias.
func ExtractImageTypeFromMime ¶
ExtractImageTypeFromMime returns the MIME image type.
func GetImageMimeType ¶
GetImageMimeType returns the MIME type based on the given image type code.
func IsFormatSupported ¶
IsFormatSupported returns true if the image format is supported by bimg.
func IsImageMimeTypeSupported ¶
IsImageMimeTypeSupported returns true if the image MIME type is supported by bimg.
Types ¶
type FilterType ¶
type FilterType int
FilterType type
const ( FilterGreyscale FilterType = iota FilterSepia )
Filter
type MockProcessor ¶
MockProcessor is an autogenerated mock type for the Processor type
func (*MockProcessor) ProcessImage ¶
func (_m *MockProcessor) ProcessImage(resource *Resource) error
ProcessImage provides a mock function with given fields: resource
type OptionParser ¶
type OptionParser struct {
// contains filtered or unexported fields
}
OptionParser struct
type Options ¶
type Options struct { Orientation bimg.Angle `schema:"or"` Crop CropType `schema:"crop"` Width int `schema:"w"` Height int `schema:"h"` Fit FitType `schema:"fit"` DPR float64 `schema:"dpr"` Brightness int `schema:"bri"` Contrast int `schema:"con"` Gamma float64 `schema:"gam"` Sharpen int `schema:"sharp"` Blur int `schema:"blur"` Filter FilterType `schema:"-"` Background []uint8 `schema:"bg"` Quality int `schema:"q"` Format bimg.ImageType `schema:"fm"` Compression int `schema:"-"` // contains filtered or unexported fields }
Options represent all the supported image transformation params as first level members
Click to show internal directories.
Click to hide internal directories.