refactor(#47): minor refactors, code normalization and test coverage

This commit is contained in:
Tomas Aparicio 2015-07-11 16:50:25 +01:00
parent 6edd96ee41
commit ed4faadba6
10 changed files with 309 additions and 92 deletions

View file

@ -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)