image

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JPG = ImageFormat("jpg")
	PNG = ImageFormat("png")
	GIF = ImageFormat("gif")
)
View Source
const MaxHeightWidth = 3840

MaxHeightWidth is the maximum allowed width and height in pixels (3840px).

許可される最大の幅と高さ(3840ピクセル)。

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// contains filtered or unexported fields
}

Image provides methods for generating random dummy images.

ランダムなダミー画像を生成するメソッドを提供する構造体。

func New

func New(rand *core.Rand, global *provider.Global) *Image

New creates a new Image instance with the given random source and global data.

指定されたランダムソースとグローバルデータで新しいImageインスタンスを作成する。

func (*Image) Base64

func (i *Image) Base64(width int, height int, format ImageFormat) (string, error)

Base64 generates a white blank image as a Base64-encoded string. Width and height should be 3840px or less.

白い空白画像をBase64エンコードされた文字列として生成する。 幅と高さは3840ピクセル以下にすること。

func (*Image) Binary

func (i *Image) Binary(width int, height int, format ImageFormat) ([]byte, error)

Binary generates a white blank image as binary data. Width and height should be 3840px or less.

白い空白画像をバイナリデータとして生成する。 幅と高さは3840ピクセル以下にすること。

func (*Image) Object

func (i *Image) Object(width int, height int, format ImageFormat) (image.Image, error)

Object generates a white blank image as an image.Image object. Width and height should be 3840px or less.

白い空白画像をimage.Imageオブジェクトとして生成する。 幅と高さは3840ピクセル以下にすること。

type ImageFormat

type ImageFormat string

ImageFormat represents the image file format.

画像ファイルのフォーマットを表す型。

Jump to

Keyboard shortcuts

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