go_imagehelper

package module
v0.0.0-...-c2b5cc5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 12 Imported by: 0

README

go-imagehelper

go image helper

this is a util that i need when i programed a tool that resize image

GetImgFromUrlToBytes

IoReaderToImage

ResizeImgToByteFromBytes

ResizeGif

ByteToImage

IoReaderToBytes

BytesToIoReader

ImageToPaletted

ResizeGifToGifs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToImage

func ByteToImage(imgbyte []byte) (image.Image, string, error)

func BytesToIoReader

func BytesToIoReader(img []byte) io.Reader

bytes to ioreader

func GetImgFromUrlToBytes

func GetImgFromUrlToBytes(url string) (b []byte, filetype string, er error)

func ImageToPaletted

func ImageToPaletted(img image.Image) *image.Paletted

func IoReaderToBytes

func IoReaderToBytes(reader io.Reader) ([]byte, error)

ioreadertoBytes

func IoReaderToImage

func IoReaderToImage(reader io.Reader) (image.Image, string, error)

Turn ioreader to image

func ResizeGifToGifs

func ResizeGifToGifs(srcFile io.Reader, width int, height int) (*gif.GIF, error)

Resize the gif to another thumbnail gif

func ResizeImgToByteFromBytes

func ResizeImgToByteFromBytes(img []byte, filetype string, width int64) ([]byte, string, error)

resize img from bytes to bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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