package
Version:
v0.6.0
Opens a new window with list of versions in this module.
Published: Sep 29, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package bitmap creates bitmap images.
Package bitmap creates bitmap images.
-
func EncodeBmp(pixelData []float64, w, h int, filepath string)
-
type Bitmap
-
func (c *Bitmap) Clear(r, g, b float64)
-
func (c *Bitmap) GetPixel(x, y int) (float64, float64, float64)
-
func (c *Bitmap) SaveImage(filename string)
-
func (c *Bitmap) SetPixel(x, y int, r, g, b float64)
-
func (c *Bitmap) SetPixelGray(x, y int, val float64)
EncodeBmp encodes a bitmap.
type Bitmap struct {
Width, Height int
Pixels []float64
}
Bitmap represents a bitmap image.
NewBitmap creates a new Bitmap.
GetPixel returns the rgb values of the pixel at the given coords.
SaveImage saves the bitmap to a file.
SetPixel sets the rgb values of the pixel at the given coords.
SetPixelGray sets the the pixel at the given coords to the gray value given.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.