bitmap

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

实现一些Go的Image转vcl/lcl的

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPixelDataEmpty        = errors.New("the pixel data is empty")
	ErrUnsupportedDataFormat = errors.New("unsupported pixel data format")
	ErrBitmapInvalid         = errors.New("bitmap invalid")
	ErrObjIsInvalid          = errors.New("object is invalid")
	ErrUnknownError          = errors.New("unknown error")
)

Functions

func ToBitmap

func ToBitmap(img image.Image) (*vcl.TBitmap, error)

CN: 32bit bmp

返回的Bmp对象用完记得Free掉

EN: 32bit bmp

Remember to free the returned bmp object

func ToBitmap2

func ToBitmap2(img image.Image, bmp *vcl.TBitmap) error

func ToGIFImage

func ToGIFImage(img image.Image) (*vcl.TGIFImage, error)

CN: 将Go的Image转为VCL/LCL的 TGIFImage

返回的gif对象用完记得Free掉

EN: Convert the image of go to TGIFImage of VCL/LCL

Remember to free the returned GIF object

func ToGoImage

func ToGoImage(obj *vcl.TGraphic) (image.Image, error)

CN: 将vcl/lcl的Graphic对象转为Go的Image EN: Convert the graphic object of VCL/LCL to the image of go

func ToJPEGImage

func ToJPEGImage(img image.Image, quality int) (*vcl.TJPEGImage, error)

CN: 将Go的Image转为VCL/LCL的 TJPEGImage

返回的jpg对象用完记得Free掉

EN: Convert the image of go to TJPEGImage of VCL/LCL

Remember to free the returned jpg object

func ToPngImage

func ToPngImage(img image.Image) (*vcl.TPngImage, error)

CN: 将Go的Image转为VCL/LCL的 TPngImage

返回的Png对象用完记得Free掉

EN: Convert the image of go to TPngImage of VCL/LCL

Remember to free the returned png object

Types

This section is empty.

Jump to

Keyboard shortcuts

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