csv2img

package module
v0.0.0-...-80f659c Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

README

go-csv2img

Converts CSV rows to an image file(e.g, PNG)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeErr

func ComposeErr[T, U, V any](
	f func(T) (U, error),
	g func(U) (V, error),
) func(T) (V, error)

func ImageToGifToStdout

func ImageToGifToStdout(i image.Image) error

func ImageToJpgToStdout

func ImageToJpgToStdout(i image.Image) error

func ImageToPngToStdout

func ImageToPngToStdout(i image.Image) error

func RectangleFromSize

func RectangleFromSize(width, height int) image.Rectangle

Types

type CsvRow

type CsvRow []string

type CsvRowToGray8

type CsvRowToGray8 func(row CsvRow, buf []uint8) ([]uint8, error)
var CsvRowToGray8Default CsvRowToGray8 = StrToGray8Default.ToCsvRowToGray8()

func (CsvRowToGray8) ToIterToImageGray8

func (c CsvRowToGray8) ToIterToImageGray8(
	rect image.Rectangle,
) IterToImageGray8

type ImageGray8

type ImageGray8 struct {
	image.Rectangle
	// contains filtered or unexported fields
}

func (ImageGray8) AsImage

func (g ImageGray8) AsImage() image.Image

func (ImageGray8) At

func (g ImageGray8) At(x, y int) color.Color

func (ImageGray8) Bounds

func (g ImageGray8) Bounds() image.Rectangle

func (ImageGray8) ColorModel

func (g ImageGray8) ColorModel() color.Model

func (ImageGray8) Data

func (g ImageGray8) Data(index int) color.Color

func (ImageGray8) Height

func (g ImageGray8) Height() int

func (ImageGray8) ToGif

func (g ImageGray8) ToGif(w io.Writer) error

func (ImageGray8) ToJpg

func (g ImageGray8) ToJpg(w io.Writer) error

func (ImageGray8) ToPng

func (g ImageGray8) ToPng(w io.Writer) error

func (ImageGray8) ToPointToIndex

func (g ImageGray8) ToPointToIndex() PointToIndex

func (ImageGray8) TotalPixelCount

func (g ImageGray8) TotalPixelCount() int

func (ImageGray8) Width

func (g ImageGray8) Width() int

type IterToImageGray8

type IterToImageGray8 func(iter.Seq2[CsvRow, error]) (ImageGray8, error)

func (IterToImageGray8) IterToImage

func (c IterToImageGray8) IterToImage(
	i iter.Seq2[CsvRow, error],
) (image.Image, error)

type PointToIndex

type PointToIndex func(image.Point) int

type StrToGray8

type StrToGray8 func(string) (uint8, error)
var StrToGray8Default StrToGray8 = func(s string) (uint8, error) {
	i, e := strconv.Atoi(s)
	return uint8(i), e
}

func (StrToGray8) ToCsvRowToGray8

func (c StrToGray8) ToCsvRowToGray8() CsvRowToGray8

Directories

Path Synopsis
cmd
csv2img command
csv

Jump to

Keyboard shortcuts

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