Documentation ¶
Index ¶
- func Open(path string) (image.Image, error)
- func OpenCr2(path string) (image.Image, error)
- func ResizeAbs(original image.Image, x, y int) (image.Image, error)
- func ResizeScale(original image.Image, percent float32) (image.Image, error)
- func Rotate(original image.Image, deg int) (image.Image, error)
- func Save(img image.Image, path string) error
- func WriteTo(encoder Encoder, writer io.Writer, img image.Image) error
- type Encoder
- type GifEncoder
- type ImageMetadata
- type JpegEncoder
- type PngEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenCr2 ¶
OpenCr2 decodds the contents of the file at path & returns an image, or a non-nil error This function uses the github.com/nf/cr2 for the underlying decode operation
func ResizeScale ¶
ResizeScale the original image using scaled to percent
Types ¶
type Encoder ¶
Encoder interface defines a simple encoder behavior that converts an image bitmap (image.Image) to a specific compression format
type ImageMetadata ¶
type ImageMetadata struct { //Source metadata Location string // Dimensions metadata SizeBytes int64 DimX int64 DimY int64 //Exif Metadata Camera *string DateTaken *time.Time Lat *float64 Long *float64 FocalLengthNumber *int64 FocalLengthDenom *int64 }
func Metadata ¶
func Metadata(path string) (*ImageMetadata, error)
type JpegEncoder ¶
type JpegEncoder struct {
Quality int
}
JpegEncoder encodes images to JPEG
func NewJpegEncoder ¶
func NewJpegEncoder(quality int) *JpegEncoder
Click to show internal directories.
Click to hide internal directories.