Copyright | (c) Alexey Kuleshevich 2019-2020 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype Pixel cs e where
- Pixel (Color cs e)
- pattern PixelX :: e -> Pixel X e
- pattern PixelRGB :: e -> e -> e -> Pixel RGB e
- pattern PixelHSI :: e -> e -> e -> Pixel HSI e
- pattern PixelHSL :: e -> e -> e -> Pixel HSL e
- pattern PixelHSV :: e -> e -> e -> Pixel HSV e
- pattern PixelCMYK :: e -> e -> e -> e -> Pixel CMYK e
- pattern PixelYCbCr :: e -> e -> e -> Pixel YCbCr e
- pattern PixelXA :: e -> e -> Pixel (Alpha X) e
- pattern PixelRGBA :: e -> e -> e -> e -> Pixel (Alpha RGB) e
- pattern PixelHSIA :: e -> e -> e -> e -> Pixel (Alpha HSI) e
- pattern PixelHSLA :: e -> e -> e -> e -> Pixel (Alpha HSL) e
- pattern PixelHSVA :: e -> e -> e -> e -> Pixel (Alpha HSV) e
- pattern PixelCMYKA :: e -> e -> e -> e -> e -> Pixel (Alpha CMYK) e
- pattern PixelYCbCrA :: e -> e -> e -> e -> Pixel (Alpha YCbCr) e
- liftPixel :: (Color cs e -> Color cs' e') -> Pixel cs e -> Pixel cs' e'
- pixelColor :: Pixel cs e -> Color cs e
- toPixel8 :: ColorModel cs e => Pixel cs e -> Pixel cs Word8
- toPixel16 :: ColorModel cs e => Pixel cs e -> Pixel cs Word16
- toPixel32 :: ColorModel cs e => Pixel cs e -> Pixel cs Word32
- toPixel64 :: ColorModel cs e => Pixel cs e -> Pixel cs Word64
- toPixelF :: ColorModel cs e => Pixel cs e -> Pixel cs Float
- toPixelD :: ColorModel cs e => Pixel cs e -> Pixel cs Double
- module Graphics.Color.Model
- module Graphics.Color.Algebra.Binary
Documentation
Digital imaging is one of the most common places for a color to be used in. The smallest element in any image is a pixel, which is defined by its color.
Since: 0.1.0
pattern PixelX :: e -> Pixel X e | Constructor for a grayscale pixel with single channel. Since: 0.1.0 |
pattern PixelRGB :: e -> e -> e -> Pixel RGB e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelHSI :: e -> e -> e -> Pixel HSI e | Constructor for Pixel with Since: 0.1.0 |
pattern PixelHSL :: e -> e -> e -> Pixel HSL e | Constructor for Pixel with Since: 0.1.0 |
pattern PixelHSV :: e -> e -> e -> Pixel HSV e | Constructor for Pixel with Since: 0.1.0 |
pattern PixelCMYK :: e -> e -> e -> e -> Pixel CMYK e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelYCbCr :: e -> e -> e -> Pixel YCbCr e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelXA :: e -> e -> Pixel (Alpha X) e | Constructor for a grayscale pixel with a transparency channel. Since: 0.1.0 |
pattern PixelRGBA :: e -> e -> e -> e -> Pixel (Alpha RGB) e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelHSIA :: e -> e -> e -> e -> Pixel (Alpha HSI) e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelHSLA :: e -> e -> e -> e -> Pixel (Alpha HSL) e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelHSVA :: e -> e -> e -> e -> Pixel (Alpha HSV) e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelCMYKA :: e -> e -> e -> e -> e -> Pixel (Alpha CMYK) e | Constructor for a pixel with Since: 0.1.0 |
pattern PixelYCbCrA :: e -> e -> e -> e -> Pixel (Alpha YCbCr) e | Constructor for a pixel with Since: 0.1.0 |
Instances
Elevation
toPixel8 :: ColorModel cs e => Pixel cs e -> Pixel cs Word8 Source #
Convert all channels of a pixel to 8bits each, while doing appropriate scaling. See
Elevator
.
Since: 0.1.0
toPixel16 :: ColorModel cs e => Pixel cs e -> Pixel cs Word16 Source #
Convert all channels of a pixel to 16bits each, while appropriate scaling. See
Elevator
.
Since: 0.1.0
toPixel32 :: ColorModel cs e => Pixel cs e -> Pixel cs Word32 Source #
Convert all channels of a pixel to 32bits each, while doing appropriate scaling. See
Elevator
.
Since: 0.1.0
toPixel64 :: ColorModel cs e => Pixel cs e -> Pixel cs Word64 Source #
Convert all channels of a pixel to 64bits each, while doing appropriate scaling. See
Elevator
.
Since: 0.1.0
toPixelF :: ColorModel cs e => Pixel cs e -> Pixel cs Float Source #
Convert all channels of a pixel to 32bit floating point numers each, while doing
appropriate scaling. See Elevator
.
Since: 0.1.0
toPixelD :: ColorModel cs e => Pixel cs e -> Pixel cs Double Source #
Convert all channels of a pixel to 64bit floating point numers each, while doing
appropriate scaling. See Elevator
.
Since: 0.1.0
module Graphics.Color.Model