Documentation ¶
Index ¶
- func AverageGray16(rect image.Rectangle, img Channel) color.Gray16
- func AverageNRGBA64(rect image.Rectangle, img *image.NRGBA64) color.NRGBA64
- func ChannelsToNRGBA64(r, g, b, a Channel) *image.NRGBA64
- func ColumnAverageGray16(radius int, img Channel) *image.Gray16
- func ConvertToAlpha(src ImageReader) *image.Alpha
- func ConvertToAlpha16(src ImageReader) *image.Alpha16
- func ConvertToGray(src ImageReader) *image.Gray
- func ConvertToGray16(src ImageReader) *image.Gray16
- func ConvertToNRGBA(src ImageReader) *image.NRGBA
- func ConvertToNRGBA64(src ImageReader) *image.NRGBA64
- func ConvertToRGBA(src ImageReader) *image.RGBA
- func ConvertToRGBA64(src ImageReader) *image.RGBA64
- func Copy(dst ImageReadWriter, src ImageReader)
- func EdgesGray16(radius int, img Channel) *image.Gray16
- func EdgesNRGBA64(radius int, img *image.NRGBA64) *image.NRGBA64
- func OpenImage(name string) (image.Image, string, error)
- func RowAverageGray16(radius int, img Channel) *image.Gray16
- type Channel
- type ImageReadWriter
- type ImageReader
- type ImageWriter
- type PP
- type RP
- func AllPointsRP(pp PP) RP
- func ColumnsRP(width int, rp RP) RP
- func ConcurrentRP(w *sync.WaitGroup, rp RP) RP
- func NColumnsRP(n int, rp RP) RP
- func NRectanglesRP(n int, rp RP) RP
- func NRowsRP(n int, rp RP) RP
- func PointsRP(offset image.Point, strideH, strideV int, pp PP) RP
- func QuickColumnsRP(rp RP) RP
- func QuickRP(rp RP) RP
- func QuickRowsRP(rp RP) RP
- func RowsRP(height int, rp RP) RP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelsToNRGBA64 ¶
func ConvertToAlpha ¶
func ConvertToAlpha(src ImageReader) *image.Alpha
ConvertToAlpha returns an *image.Alpha instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.Alpha instance with the same bounds.
func ConvertToAlpha16 ¶
func ConvertToAlpha16(src ImageReader) *image.Alpha16
ConvertToAlpha16 returns an *image.Alpha16 instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.Alpha16 instance with the same bounds.
func ConvertToGray ¶
func ConvertToGray(src ImageReader) *image.Gray
ConvertToGray returns an *image.Gray instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.Gray instance with the same bounds.
func ConvertToGray16 ¶
func ConvertToGray16(src ImageReader) *image.Gray16
ConvertToGray16 returns an *image.Gray16 instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.Gray16 instance with the same bounds.
func ConvertToNRGBA ¶
func ConvertToNRGBA(src ImageReader) *image.NRGBA
ConvertToNRGBA returns an *image.NRGBA instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.NRGBA instance with the same bounds.
func ConvertToNRGBA64 ¶
func ConvertToNRGBA64(src ImageReader) *image.NRGBA64
ConvertToNRGBA64 returns an *image.NRGBA64 instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.NRGBA64 instance with the same bounds.
func ConvertToRGBA ¶
func ConvertToRGBA(src ImageReader) *image.RGBA
ConvertToRGBA returns an *image.RGBA instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.RGBA instance with the same bounds.
func ConvertToRGBA64 ¶
func ConvertToRGBA64(src ImageReader) *image.RGBA64
ConvertToRGBA64 returns an *image.RGBA64 instance by asserting the given ImageReader has that type or, if it does not, using Copy to concurrently set the color.Color values of a new *image.RGBA64 instance with the same bounds.
func Copy ¶
func Copy(dst ImageReadWriter, src ImageReader)
Copy concurrently copies Color values from a source ImageReader to a destination ImageReadWriter.
Types ¶
type Channel ¶
type Channel interface { ImageReader Gray16At(x, y int) color.Gray16 }
Channel is any object that implements ImageReader as well as providing a method for getting color.Gray16 values at given coordinates. The standard library's image.Gray16 implements Channel.
func NRGBA64ToChannels ¶
Channels decomposes a given NRGBA64 into red, green, blue, and alpha Channels.
type ImageReadWriter ¶
type ImageReadWriter interface { ImageReader ImageWriter }
ImageReadWriter implements both ImageReader and ImageWriter.
type ImageReader ¶
type ImageReader interface { At(x, y int) color.Color Bounds() image.Rectangle ColorModel() color.Model }
ImageReader implements the same methods as the standard image interface.
func Invert ¶
func Invert(img ImageReader) ImageReader
type ImageWriter ¶
ImageWriter implements a method for setting colors at individual coordinates (which all standard image types implement).
type PP ¶
PP is a point processor, any function that accepts a single image.Point value as an argument.
type RP ¶
RP is a rectangle processor, any function that accepts a single image.Rectangle value as an argument.
func AllPointsRP ¶
AllPointsRP returns a RP that runs a given PP at every point within an input rectangle.
func ColumnsRP ¶
ColumnsRP returns a RP that devides an input rectangle into columns of a given width and calls the provided RP on each. The last column proccessed will be any remainder and may not be of the given width.
func ConcurrentRP ¶
ConcurrentRP wraps a given RP in a Go routine and the necessary WaitGroup operations to ensure that completion can be tracked.
func NColumnsRP ¶
NColumnsRP calls the given RP on each of n vertical rectangles that span the input rectangle.
func NRectanglesRP ¶
NRectanglesRP calls the given RP on each of n horizontal or vertical rectangles that span the input rectangle.
func NRowsRP ¶
NRowsRP calls the given RP on each of n horizontal rectangles that span the input rectangle.
func PointsRP ¶
PointsRP returns a RP that runs a given PP at each point within an input rectangle starting at a given offset and seperated by the given horizontal and vertical stride.
func QuickColumnsRP ¶
QuickColumnsRP calls the given RP concurrently on each of GOMAXPROCS vertical rectangles that span the input rectangle.
func QuickRP ¶
QuickRP calls the given RP concurrently on each of GOMAXPROCS horizontal or vertical rectangles that span the input rectangle.
func QuickRowsRP ¶
QuickRowsRP calls the given RP concurrently on each of GOMAXPROCS horizontal rectangles that span the input rectangle.