imgo

package module
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 44

README

img

CircleCI Status codecov Build Status Go Report Card GoDoc Release

Documentation

Overview

Package imgo get the image info

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeFile

func DecodeFile(fileName string) (image.Image, string, error)

DecodeFile decodes image file

func Destroy

func Destroy(filePath string) error

Destroy destroy the file

func Encode

func Encode(out io.Writer, subImg image.Image, fm string) error

Encode encode image to buf

func GetSize

func GetSize(imagePath string) (int, int, error)

GetSize get the image's size

func ImgToBytes

func ImgToBytes(path string) ([]byte, error)

ImgToBytes trans image to []byte

func IsBlack

func IsBlack(c color.Color) bool

IsBlack color is black

func ModTime

func ModTime(filePath string) (int64, error)

ModTime file modified time

func PngToBytes

func PngToBytes(path string) ([]byte, error)

PngToBytes trans png to []byte

func ReadPNG

func ReadPNG(path string) image.Image

ReadPNG read png return image.Image

func Rename

func Rename(filePath, to string) error

Rename rename file name

func Save

func Save(path string, dist []byte) error

Save []byte to image path

func SaveToJpeg added in v0.11.0

func SaveToJpeg(path string, img image.Image) error

SaveToJpeg create a jpeg file with the image.Image

func SaveToPNG

func SaveToPNG(path string, img image.Image) error

SaveToPNG create a png file with the image.Image

func ToBytes

func ToBytes(img image.Image, fm string) ([]byte, error)

ToBytes trans image.Image to []byte

func ToBytesPng

func ToBytesPng(img image.Image) ([]byte, error)

ToBytesPng trans image.Image to []byte

func ToString

func ToString(img image.Image) (result string)

ToString tostring image.Image

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL