Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides high level functions to do geometric transformations on images.
Every transformation is been declared INLINABLE
so new image types could be
specialized.
Synopsis
- data InterpolMethod
- crop :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => Rect -> i1 -> i2
- resize :: (Image i1, Interpolable (ImagePixel i1), FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2, Integral (ImageChannel i1)) => InterpolMethod -> Size -> i1 -> i2
- horizontalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2
- verticalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2
- floodFill :: (PrimMonad m, MutableImage i, Eq (ImagePixel (Freezed i))) => Point -> ImagePixel (Freezed i) -> i (PrimState m) -> m ()
Documentation
data InterpolMethod Source #
Defines the set of possible methods for pixel interpolations when looking for a pixel at floating point coordinates.
TruncateInteger | Selects the top left pixel (fastest). |
NearestNeighbor | Selects the nearest pixel (fast). |
Bilinear | Does a double linear interpolation over the four surrounding points (slow). |
crop :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => Rect -> i1 -> i2 Source #
Maps the content of the image's rectangle in a new image.
resize :: (Image i1, Interpolable (ImagePixel i1), FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2, Integral (ImageChannel i1)) => InterpolMethod -> Size -> i1 -> i2 Source #
Resizes the Image
using the given interpolation method.
horizontalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2 Source #
Reverses the image horizontally.
verticalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2 Source #
Reverses the image vertically.
floodFill :: (PrimMonad m, MutableImage i, Eq (ImagePixel (Freezed i))) => Point -> ImagePixel (Freezed i) -> i (PrimState m) -> m () Source #
Paints with a new value the pixels surrounding the given point of the image which have the same value as the starting point.