bitmap

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 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")
)

Functions

func ToBitmap

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

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

func ToBitmap2

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

func ToGIFImage

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

将Go的Image转为VCL/LCL的 TGIFImage 返回的gif对象用完记得Free掉

func ToGoImage

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

将vcl/lcl的Graphic对象转为Go的Image

func ToJPEGImage

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

将Go的Image转为VCL/LCL的 TJPEGImage 返回的jpg对象用完记得Free掉

func ToPngImage

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

将Go的Image转为VCL/LCL的 TPngImage 返回的Png对象用完记得Free掉

Types

This section is empty.

Jump to

Keyboard shortcuts

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