bitmap

package
v0.0.0-...-f46019e Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

实现一些Go的Image转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)

32bit bmp

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

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)

将Go的Image转为LCL的 TGIFImage

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

Convert the image of go to TGIFImage of LCL

Remember to free the returned GIF object

func ToGoImage

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

将lcl的Graphic对象转为Go的Image

Convert the graphic object of LCL to the image of go

func ToJPEGImage

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

将Go的Image转为LCL的 TJPEGImage

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

Convert the image of go to TJPEGImage of LCL

Remember to free the returned jpg object

func ToPngImage

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

将Go的Image转为LCL的 TPngImage

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

Convert the image of go to TPngImage of 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