img2csv

package module
v0.0.0-...-770ef1c Latest Latest
Warning

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

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

README

go-img2csv

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

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 ReaderToImage

func ReaderToImage(rdr io.Reader) (image.Image, error)

Types

type Color

type Color struct{ color.Color }

func (Color) Gray8

func (c Color) Gray8() uint8

type GrayToString8

type GrayToString8 func(uint8) string
var GrayToString8Default GrayToString8 = func(gray uint8) string {
	var s string = strconv.Itoa(int(gray))
	return s
}

func (GrayToString8) RowToStringsGray8

func (g GrayToString8) RowToStringsGray8(row []uint8, buf []string) []string

type Image

type Image struct{ image.Image }

func (Image) Gray8

func (i Image) Gray8(x, y int) uint8

func (Image) Height

func (i Image) Height() int

func (Image) ToRowGray8

func (i Image) ToRowGray8(buf []uint8, y int) []uint8

func (Image) Width

func (i Image) Width() int

Directories

Path Synopsis
cmd
img2csv command
csv

Jump to

Keyboard shortcuts

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