adjust

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package adjust provides basic color correction functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(img image.Image, fn func(color.RGBA) color.RGBA) *image.RGBA

Apply returns a copy of the provided image after applying the provided color function to each pixel.

func Brightness

func Brightness(src image.Image, change float64) *image.RGBA

Brightness returns a copy of the image with the adjusted brightness. Change is the normalized amount of change to be applied (range -1.0 to 1.0).

func Contrast

func Contrast(src image.Image, change float64) *image.RGBA

Contrast returns a copy of the image with its difference in high and low values adjusted by the change param. Change is the normalized amount of change to be applied, in the range of -1.0 to 1.0. If Change is set to 0.0, then the values remain the same, if it's set to 0.5, then all values will be moved 50% away from the middle value.

func Gamma

func Gamma(src image.Image, gamma float64) *image.RGBA

Gamma returns a gamma corrected copy of the image. Provided gamma param must be larger than 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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