utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGrayMatrix

func GetGrayMatrix(img image.Image) [][]uint8

GetGrayMatrix converts an arbitrary image into a 2D grid of 8-bit grayscale values. This is used as the raw input for most steganalysis algorithms.

func LoadImage

func LoadImage(path string) (image.Image, error)

LoadImage opens a file from the disk and decodes it into an image.Image. It supports JPEG, PNG, and BMP formats via side-effect imports.

func SaveImage

func SaveImage(img image.Image, path string) error

SaveImage encodes and saves an image to the specified path. The format is determined by the file extension (.png, .jpg, .bmp).

Quality settings:

  • JPEG: Quality 90
  • BMP/PNG: Default settings

Types

This section is empty.

Jump to

Keyboard shortcuts

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