mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 15:38:13 -07:00
refactor(#47): minor refactors, code normalization and test coverage
This commit is contained in:
parent
6edd96ee41
commit
ed4faadba6
10 changed files with 309 additions and 92 deletions
11
image.go
11
image.go
|
|
@ -155,6 +155,17 @@ func (i *Image) Metadata() (ImageMetadata, error) {
|
|||
return Metadata(i.buffer)
|
||||
}
|
||||
|
||||
// Get the image interpretation type
|
||||
// See: http://www.vips.ecs.soton.ac.uk/supported/current/doc/html/libvips/VipsImage.html#VipsInterpretation
|
||||
func (i *Image) Interpretation() (Interpretation, error) {
|
||||
return ImageInterpretation(i.buffer)
|
||||
}
|
||||
|
||||
// Check if the current image has a valid colourspace
|
||||
func (i *Image) ColourspaceIsSupported() (bool, error) {
|
||||
return ColourspaceIsSupported(i.buffer)
|
||||
}
|
||||
|
||||
// Get image type format (jpeg, png, webp, tiff)
|
||||
func (i *Image) Type() string {
|
||||
return DetermineImageTypeName(i.buffer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue