offimg

package
v0.0.0-...-8b0ec84 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const Height = 240
View Source
const Width = 400

Variables

This section is empty.

Functions

func WriteImage

func WriteImage(img image.Image, w io.Writer) error

Types

type BitmapColors

type BitmapColors []RGBQuad

type BitmapFileHeader

type BitmapFileHeader struct {
	BfType      [2]byte
	BfSize      uint32
	BfReserved1 uint16
	BfReserved2 uint16
	BfOffBits   uint32
}

type BitmapInfoHeader

type BitmapInfoHeader struct {
	BfSize           uint32
	BitWidth         uint32
	BitHeight        uint32
	BiPlanes         uint16
	BiBitCount       uint16
	BiCompressing    uint32
	BiSizeImage      uint32
	BiXPixelPerMeter uint32
	BiYPixelPerMeter uint32
	BiClrUsed        uint32
	BiClrImportant   uint32
}

type CropSpec

type CropSpec struct {
	DefinedPtOne image.Point
	DefinedPtTwo image.Point
}

func (*CropSpec) Crop

func (c *CropSpec) Crop(img image.Image, asp float64) (image.Image, error)

func (*CropSpec) CropResize

func (c *CropSpec) CropResize(img image.Image, width uint, height uint) (image.Image, error)

type RGBQuad

type RGBQuad struct {
	Blue, Green, Red, Reserved uint8
}

func Black

func Black() RGBQuad

func White

func White() RGBQuad

Jump to

Keyboard shortcuts

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