rgf

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

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

Go to latest
Published: Jul 28, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package rgf provides functionality for reading and writing EV3 RGF files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader) (image.Image, error)

Decode RGF image from reader 'r'.

func Encode

func Encode(w io.Writer, src image.Image, render draw.Drawer) error

Encode image 'src' to RGF to writer 'w', while using Drawer 'render' for colorspace conversion. Render can be nil, in which case builtin Floyd-Steinberg dithering drawer will be used.

func NewImageProxy

func NewImageProxy(im image.Image, start, size image.Point, hardlimit bool, bt601 bool) image.Image

Create a new image proxy - im - image to wrap - start - crop source image to start from this point - size - crop source image to this width and height - hardlimit - whether to also crop to the 255x255 RGF limit - bt601 - whether to perform RGB -> BT.601 color conversion

Types

type ImageProxy

type ImageProxy struct {
	Image image.Image
	Crop  image.Rectangle
	BT601 bool
}

Image proxy for cropping and grayscale transformation

func (*ImageProxy) At

func (proxy *ImageProxy) At(x, y int) color.Color

Return original or filtered pixel at a specific point.

func (*ImageProxy) Bounds

func (proxy *ImageProxy) Bounds() image.Rectangle

Return cropped image bounds.

func (*ImageProxy) ColorModel

func (proxy *ImageProxy) ColorModel() color.Model

Return original or filtered color model.

Jump to

Keyboard shortcuts

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