imageobfuscation

package module
v0.0.0-...-75ba043 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 14 Imported by: 0

README

image-obfuscation

image obfuscation by slightly changing the FFT amplitude

prerequisites

just use brew install fftw pngquant jpegoptim on macOS to install them.

download

Download the pre-compiled released on macOS here.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAnimatedImageNotSupported = errors.New("animated image not supported")

ErrAnimatedImageNotSupported animated image not supported

View Source
var ErrFFTHasNotPerformed = errors.New("FFT of this image haven't performed")

ErrFFTHasNotPerformed returned when FFT get/set when FFT haven't performed

View Source
var ErrImageNotSupported = errors.New("image type not supported")

ErrImageNotSupported image not supportted

Functions

This section is empty.

Types

type Image

type Image struct {
	sync.RWMutex
	image.Image
	// contains filtered or unexported fields
}

Image image class with FFT / DFT ability

func (*Image) Destory

func (m *Image) Destory()

Destory release memory handled by FFTW

func (*Image) FFT

func (m *Image) FFT(force bool)

FFT do FFT on image

func (*Image) GetFFT

func (m *Image) GetFFT(order, x, y int) (complex128, error)

GetFFT get a color order's [x,y] FFT value

func (*Image) IFFT

func (m *Image) IFFT() *Image

IFFT do inverse FFT

func (*Image) SetFFT

func (m *Image) SetFFT(order, x, y int, v complex128) error

SetFFT set a color order's [x,y] FFT value

type ImageType

type ImageType int

ImageType image type

const (
	// ImageTypePNG png
	ImageTypePNG ImageType = iota
	// ImageTypeJPG jpeg
	ImageTypeJPG
	// ImageTypeGIF gif
	ImageTypeGIF
	// ImageTypeNotSupported not supported
	ImageTypeNotSupported
)

func Obfuscate

func Obfuscate(inputFileName, outputFileName string) (ImageType, error)

Obfuscate makes image obfuscation on inputFileName to outputFileName

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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