massiv-io-0.1.4.0: Import/export of Image files into massiv Arrays

Copyright(c) Alexey Kuleshevich 2018
LicenseBSD3
MaintainerAlexey Kuleshevich <lehins@yandex.ru>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Graphics.ColorSpace

Contents

Description

 

Synopsis

Pixels

Family of Pixels

Pixel is a type family for all available color spaces. Below is the listed of all class instances, that pixels are installed in, as well as all pixel constructors.

>>> :t (PixelY 0) -- Black pixel in Luma
(PixelY 0) :: Num e => Pixel Y e
>>> PixelRGB 255 0 0 :: Pixel RGB Word8 -- Red pixel in RGB
<RGB:(255|0|0)>
>>> PixelRGB 1 0 0 :: Pixel RGB Double -- Same red pixel in RGB with Double precision.
<RGB:(1.0|0.0|0.0)>
>>> (PixelRGB 255 0 0 :: Pixel RGB Word8) == (toWord8 <$> (PixelRGB 1 0 0 :: Pixel RGB Double))
True

data family Pixel cs e :: * Source #

A Pixel family with a color space and a precision of elements.

Instances

ColorSpace cs e => Vector Vector (Pixel cs e) Source # 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Pixel cs e) -> m (Vector (Pixel cs e)) #

basicUnsafeThaw :: PrimMonad m => Vector (Pixel cs e) -> m (Mutable Vector (PrimState m) (Pixel cs e)) #

basicLength :: Vector (Pixel cs e) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Pixel cs e) -> Vector (Pixel cs e) #

basicUnsafeIndexM :: Monad m => Vector (Pixel cs e) -> Int -> m (Pixel cs e) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Pixel cs e) -> Vector (Pixel cs e) -> m () #

elemseq :: Vector (Pixel cs e) -> Pixel cs e -> b -> b #

ColorSpace cs e => MVector MVector (Pixel cs e) Source # 

Methods

basicLength :: MVector s (Pixel cs e) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Pixel cs e) -> MVector s (Pixel cs e) #

basicOverlaps :: MVector s (Pixel cs e) -> MVector s (Pixel cs e) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Pixel cs e)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> Pixel cs e -> m (MVector (PrimState m) (Pixel cs e)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> Int -> m (Pixel cs e) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> Int -> Pixel cs e -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> Pixel cs e -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> MVector (PrimState m) (Pixel cs e) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> MVector (PrimState m) (Pixel cs e) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Pixel cs e) -> Int -> m (MVector (PrimState m) (Pixel cs e)) #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TIF (Image r cs e) Source # 

Methods

encode :: TIF -> WriteOptions TIF -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TGA (Image r cs e) Source # 

Methods

encode :: TGA -> WriteOptions TGA -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable JPG (Image r cs e) Source # 

Methods

encode :: JPG -> WriteOptions JPG -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable HDR (Image r cs e) Source # 

Methods

encode :: HDR -> WriteOptions HDR -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable GIF (Image r cs e) Source # 

Methods

encode :: GIF -> WriteOptions GIF -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable PNG (Image r cs e) Source # 

Methods

encode :: PNG -> WriteOptions PNG -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable BMP (Image r cs e) Source # 

Methods

encode :: BMP -> WriteOptions BMP -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable TIF (Image S cs e) Source # 

Methods

decode :: TIF -> ReadOptions TIF -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable TGA (Image S cs e) Source # 

Methods

decode :: TGA -> ReadOptions TGA -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable JPG (Image S cs e) Source # 

Methods

decode :: JPG -> ReadOptions JPG -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable HDR (Image S cs e) Source # 

Methods

decode :: HDR -> ReadOptions HDR -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable GIF (Image S cs e) Source # 

Methods

decode :: GIF -> ReadOptions GIF -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PNG (Image S cs e) Source # 

Methods

decode :: PNG -> ReadOptions PNG -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable BMP (Image S cs e) Source # 

Methods

decode :: BMP -> ReadOptions BMP -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PPM (Image S cs e) Source # 

Methods

decode :: PPM -> ReadOptions PPM -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PGM (Image S cs e) Source # 

Methods

decode :: PGM -> ReadOptions PGM -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PBM (Image S cs e) Source # 

Methods

decode :: PBM -> ReadOptions PBM -> ByteString -> Image S cs e Source #

Monad (Pixel X) # 

Methods

(>>=) :: Pixel X a -> (a -> Pixel X b) -> Pixel X b #

(>>) :: Pixel X a -> Pixel X b -> Pixel X b #

return :: a -> Pixel X a #

fail :: String -> Pixel X a #

Monad (Pixel Y) # 

Methods

(>>=) :: Pixel Y a -> (a -> Pixel Y b) -> Pixel Y b #

(>>) :: Pixel Y a -> Pixel Y b -> Pixel Y b #

return :: a -> Pixel Y a #

fail :: String -> Pixel Y a #

Functor (Pixel HSIA) # 

Methods

fmap :: (a -> b) -> Pixel HSIA a -> Pixel HSIA b #

(<$) :: a -> Pixel HSIA b -> Pixel HSIA a #

Functor (Pixel HSI) # 

Methods

fmap :: (a -> b) -> Pixel HSI a -> Pixel HSI b #

(<$) :: a -> Pixel HSI b -> Pixel HSI a #

Functor (Pixel CMYKA) # 

Methods

fmap :: (a -> b) -> Pixel CMYKA a -> Pixel CMYKA b #

(<$) :: a -> Pixel CMYKA b -> Pixel CMYKA a #

Functor (Pixel CMYK) # 

Methods

fmap :: (a -> b) -> Pixel CMYK a -> Pixel CMYK b #

(<$) :: a -> Pixel CMYK b -> Pixel CMYK a #

Functor (Pixel RGBA) # 

Methods

fmap :: (a -> b) -> Pixel RGBA a -> Pixel RGBA b #

(<$) :: a -> Pixel RGBA b -> Pixel RGBA a #

Functor (Pixel RGB) # 

Methods

fmap :: (a -> b) -> Pixel RGB a -> Pixel RGB b #

(<$) :: a -> Pixel RGB b -> Pixel RGB a #

Functor (Pixel X) # 

Methods

fmap :: (a -> b) -> Pixel X a -> Pixel X b #

(<$) :: a -> Pixel X b -> Pixel X a #

Functor (Pixel YA) # 

Methods

fmap :: (a -> b) -> Pixel YA a -> Pixel YA b #

(<$) :: a -> Pixel YA b -> Pixel YA a #

Functor (Pixel Y) # 

Methods

fmap :: (a -> b) -> Pixel Y a -> Pixel Y b #

(<$) :: a -> Pixel Y b -> Pixel Y a #

Functor (Pixel YCbCrA) # 

Methods

fmap :: (a -> b) -> Pixel YCbCrA a -> Pixel YCbCrA b #

(<$) :: a -> Pixel YCbCrA b -> Pixel YCbCrA a #

Functor (Pixel YCbCr) # 

Methods

fmap :: (a -> b) -> Pixel YCbCr a -> Pixel YCbCr b #

(<$) :: a -> Pixel YCbCr b -> Pixel YCbCr a #

Applicative (Pixel HSIA) # 

Methods

pure :: a -> Pixel HSIA a #

(<*>) :: Pixel HSIA (a -> b) -> Pixel HSIA a -> Pixel HSIA b #

liftA2 :: (a -> b -> c) -> Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA c #

(*>) :: Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA b #

(<*) :: Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA a #

Applicative (Pixel HSI) # 

Methods

pure :: a -> Pixel HSI a #

(<*>) :: Pixel HSI (a -> b) -> Pixel HSI a -> Pixel HSI b #

liftA2 :: (a -> b -> c) -> Pixel HSI a -> Pixel HSI b -> Pixel HSI c #

(*>) :: Pixel HSI a -> Pixel HSI b -> Pixel HSI b #

(<*) :: Pixel HSI a -> Pixel HSI b -> Pixel HSI a #

Applicative (Pixel CMYKA) # 

Methods

pure :: a -> Pixel CMYKA a #

(<*>) :: Pixel CMYKA (a -> b) -> Pixel CMYKA a -> Pixel CMYKA b #

liftA2 :: (a -> b -> c) -> Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA c #

(*>) :: Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA b #

(<*) :: Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA a #

Applicative (Pixel CMYK) # 

Methods

pure :: a -> Pixel CMYK a #

(<*>) :: Pixel CMYK (a -> b) -> Pixel CMYK a -> Pixel CMYK b #

liftA2 :: (a -> b -> c) -> Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK c #

(*>) :: Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK b #

(<*) :: Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK a #

Applicative (Pixel RGBA) # 

Methods

pure :: a -> Pixel RGBA a #

(<*>) :: Pixel RGBA (a -> b) -> Pixel RGBA a -> Pixel RGBA b #

liftA2 :: (a -> b -> c) -> Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA c #

(*>) :: Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA b #

(<*) :: Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA a #

Applicative (Pixel RGB) # 

Methods

pure :: a -> Pixel RGB a #

(<*>) :: Pixel RGB (a -> b) -> Pixel RGB a -> Pixel RGB b #

liftA2 :: (a -> b -> c) -> Pixel RGB a -> Pixel RGB b -> Pixel RGB c #

(*>) :: Pixel RGB a -> Pixel RGB b -> Pixel RGB b #

(<*) :: Pixel RGB a -> Pixel RGB b -> Pixel RGB a #

Applicative (Pixel X) # 

Methods

pure :: a -> Pixel X a #

(<*>) :: Pixel X (a -> b) -> Pixel X a -> Pixel X b #

liftA2 :: (a -> b -> c) -> Pixel X a -> Pixel X b -> Pixel X c #

(*>) :: Pixel X a -> Pixel X b -> Pixel X b #

(<*) :: Pixel X a -> Pixel X b -> Pixel X a #

Applicative (Pixel YA) # 

Methods

pure :: a -> Pixel YA a #

(<*>) :: Pixel YA (a -> b) -> Pixel YA a -> Pixel YA b #

liftA2 :: (a -> b -> c) -> Pixel YA a -> Pixel YA b -> Pixel YA c #

(*>) :: Pixel YA a -> Pixel YA b -> Pixel YA b #

(<*) :: Pixel YA a -> Pixel YA b -> Pixel YA a #

Applicative (Pixel Y) # 

Methods

pure :: a -> Pixel Y a #

(<*>) :: Pixel Y (a -> b) -> Pixel Y a -> Pixel Y b #

liftA2 :: (a -> b -> c) -> Pixel Y a -> Pixel Y b -> Pixel Y c #

(*>) :: Pixel Y a -> Pixel Y b -> Pixel Y b #

(<*) :: Pixel Y a -> Pixel Y b -> Pixel Y a #

Applicative (Pixel YCbCrA) # 

Methods

pure :: a -> Pixel YCbCrA a #

(<*>) :: Pixel YCbCrA (a -> b) -> Pixel YCbCrA a -> Pixel YCbCrA b #

liftA2 :: (a -> b -> c) -> Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA c #

(*>) :: Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA b #

(<*) :: Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA a #

Applicative (Pixel YCbCr) # 

Methods

pure :: a -> Pixel YCbCr a #

(<*>) :: Pixel YCbCr (a -> b) -> Pixel YCbCr a -> Pixel YCbCr b #

liftA2 :: (a -> b -> c) -> Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr c #

(*>) :: Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr b #

(<*) :: Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr a #

Foldable (Pixel HSIA) # 

Methods

fold :: Monoid m => Pixel HSIA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel HSIA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel HSIA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel HSIA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel HSIA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel HSIA a -> b #

foldr1 :: (a -> a -> a) -> Pixel HSIA a -> a #

foldl1 :: (a -> a -> a) -> Pixel HSIA a -> a #

toList :: Pixel HSIA a -> [a] #

null :: Pixel HSIA a -> Bool #

length :: Pixel HSIA a -> Int #

elem :: Eq a => a -> Pixel HSIA a -> Bool #

maximum :: Ord a => Pixel HSIA a -> a #

minimum :: Ord a => Pixel HSIA a -> a #

sum :: Num a => Pixel HSIA a -> a #

product :: Num a => Pixel HSIA a -> a #

Foldable (Pixel HSI) # 

Methods

fold :: Monoid m => Pixel HSI m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel HSI a -> m #

foldr :: (a -> b -> b) -> b -> Pixel HSI a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel HSI a -> b #

foldl :: (b -> a -> b) -> b -> Pixel HSI a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel HSI a -> b #

foldr1 :: (a -> a -> a) -> Pixel HSI a -> a #

foldl1 :: (a -> a -> a) -> Pixel HSI a -> a #

toList :: Pixel HSI a -> [a] #

null :: Pixel HSI a -> Bool #

length :: Pixel HSI a -> Int #

elem :: Eq a => a -> Pixel HSI a -> Bool #

maximum :: Ord a => Pixel HSI a -> a #

minimum :: Ord a => Pixel HSI a -> a #

sum :: Num a => Pixel HSI a -> a #

product :: Num a => Pixel HSI a -> a #

Foldable (Pixel CMYKA) # 

Methods

fold :: Monoid m => Pixel CMYKA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel CMYKA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel CMYKA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel CMYKA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel CMYKA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel CMYKA a -> b #

foldr1 :: (a -> a -> a) -> Pixel CMYKA a -> a #

foldl1 :: (a -> a -> a) -> Pixel CMYKA a -> a #

toList :: Pixel CMYKA a -> [a] #

null :: Pixel CMYKA a -> Bool #

length :: Pixel CMYKA a -> Int #

elem :: Eq a => a -> Pixel CMYKA a -> Bool #

maximum :: Ord a => Pixel CMYKA a -> a #

minimum :: Ord a => Pixel CMYKA a -> a #

sum :: Num a => Pixel CMYKA a -> a #

product :: Num a => Pixel CMYKA a -> a #

Foldable (Pixel CMYK) # 

Methods

fold :: Monoid m => Pixel CMYK m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel CMYK a -> m #

foldr :: (a -> b -> b) -> b -> Pixel CMYK a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel CMYK a -> b #

foldl :: (b -> a -> b) -> b -> Pixel CMYK a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel CMYK a -> b #

foldr1 :: (a -> a -> a) -> Pixel CMYK a -> a #

foldl1 :: (a -> a -> a) -> Pixel CMYK a -> a #

toList :: Pixel CMYK a -> [a] #

null :: Pixel CMYK a -> Bool #

length :: Pixel CMYK a -> Int #

elem :: Eq a => a -> Pixel CMYK a -> Bool #

maximum :: Ord a => Pixel CMYK a -> a #

minimum :: Ord a => Pixel CMYK a -> a #

sum :: Num a => Pixel CMYK a -> a #

product :: Num a => Pixel CMYK a -> a #

Foldable (Pixel RGBA) # 

Methods

fold :: Monoid m => Pixel RGBA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel RGBA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel RGBA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel RGBA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel RGBA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel RGBA a -> b #

foldr1 :: (a -> a -> a) -> Pixel RGBA a -> a #

foldl1 :: (a -> a -> a) -> Pixel RGBA a -> a #

toList :: Pixel RGBA a -> [a] #

null :: Pixel RGBA a -> Bool #

length :: Pixel RGBA a -> Int #

elem :: Eq a => a -> Pixel RGBA a -> Bool #

maximum :: Ord a => Pixel RGBA a -> a #

minimum :: Ord a => Pixel RGBA a -> a #

sum :: Num a => Pixel RGBA a -> a #

product :: Num a => Pixel RGBA a -> a #

Foldable (Pixel RGB) # 

Methods

fold :: Monoid m => Pixel RGB m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel RGB a -> m #

foldr :: (a -> b -> b) -> b -> Pixel RGB a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel RGB a -> b #

foldl :: (b -> a -> b) -> b -> Pixel RGB a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel RGB a -> b #

foldr1 :: (a -> a -> a) -> Pixel RGB a -> a #

foldl1 :: (a -> a -> a) -> Pixel RGB a -> a #

toList :: Pixel RGB a -> [a] #

null :: Pixel RGB a -> Bool #

length :: Pixel RGB a -> Int #

elem :: Eq a => a -> Pixel RGB a -> Bool #

maximum :: Ord a => Pixel RGB a -> a #

minimum :: Ord a => Pixel RGB a -> a #

sum :: Num a => Pixel RGB a -> a #

product :: Num a => Pixel RGB a -> a #

Foldable (Pixel X) # 

Methods

fold :: Monoid m => Pixel X m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel X a -> m #

foldr :: (a -> b -> b) -> b -> Pixel X a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel X a -> b #

foldl :: (b -> a -> b) -> b -> Pixel X a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel X a -> b #

foldr1 :: (a -> a -> a) -> Pixel X a -> a #

foldl1 :: (a -> a -> a) -> Pixel X a -> a #

toList :: Pixel X a -> [a] #

null :: Pixel X a -> Bool #

length :: Pixel X a -> Int #

elem :: Eq a => a -> Pixel X a -> Bool #

maximum :: Ord a => Pixel X a -> a #

minimum :: Ord a => Pixel X a -> a #

sum :: Num a => Pixel X a -> a #

product :: Num a => Pixel X a -> a #

Foldable (Pixel YA) # 

Methods

fold :: Monoid m => Pixel YA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YA a -> b #

foldr1 :: (a -> a -> a) -> Pixel YA a -> a #

foldl1 :: (a -> a -> a) -> Pixel YA a -> a #

toList :: Pixel YA a -> [a] #

null :: Pixel YA a -> Bool #

length :: Pixel YA a -> Int #

elem :: Eq a => a -> Pixel YA a -> Bool #

maximum :: Ord a => Pixel YA a -> a #

minimum :: Ord a => Pixel YA a -> a #

sum :: Num a => Pixel YA a -> a #

product :: Num a => Pixel YA a -> a #

Foldable (Pixel Y) # 

Methods

fold :: Monoid m => Pixel Y m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel Y a -> m #

foldr :: (a -> b -> b) -> b -> Pixel Y a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel Y a -> b #

foldl :: (b -> a -> b) -> b -> Pixel Y a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel Y a -> b #

foldr1 :: (a -> a -> a) -> Pixel Y a -> a #

foldl1 :: (a -> a -> a) -> Pixel Y a -> a #

toList :: Pixel Y a -> [a] #

null :: Pixel Y a -> Bool #

length :: Pixel Y a -> Int #

elem :: Eq a => a -> Pixel Y a -> Bool #

maximum :: Ord a => Pixel Y a -> a #

minimum :: Ord a => Pixel Y a -> a #

sum :: Num a => Pixel Y a -> a #

product :: Num a => Pixel Y a -> a #

Foldable (Pixel YCbCrA) # 

Methods

fold :: Monoid m => Pixel YCbCrA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YCbCrA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YCbCrA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YCbCrA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YCbCrA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YCbCrA a -> b #

foldr1 :: (a -> a -> a) -> Pixel YCbCrA a -> a #

foldl1 :: (a -> a -> a) -> Pixel YCbCrA a -> a #

toList :: Pixel YCbCrA a -> [a] #

null :: Pixel YCbCrA a -> Bool #

length :: Pixel YCbCrA a -> Int #

elem :: Eq a => a -> Pixel YCbCrA a -> Bool #

maximum :: Ord a => Pixel YCbCrA a -> a #

minimum :: Ord a => Pixel YCbCrA a -> a #

sum :: Num a => Pixel YCbCrA a -> a #

product :: Num a => Pixel YCbCrA a -> a #

Foldable (Pixel YCbCr) # 

Methods

fold :: Monoid m => Pixel YCbCr m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YCbCr a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YCbCr a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YCbCr a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YCbCr a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YCbCr a -> b #

foldr1 :: (a -> a -> a) -> Pixel YCbCr a -> a #

foldl1 :: (a -> a -> a) -> Pixel YCbCr a -> a #

toList :: Pixel YCbCr a -> [a] #

null :: Pixel YCbCr a -> Bool #

length :: Pixel YCbCr a -> Int #

elem :: Eq a => a -> Pixel YCbCr a -> Bool #

maximum :: Ord a => Pixel YCbCr a -> a #

minimum :: Ord a => Pixel YCbCr a -> a #

sum :: Num a => Pixel YCbCr a -> a #

product :: Num a => Pixel YCbCr a -> a #

FileFormat (Decode (Image r cs e)) Source # 

Associated Types

type ReadOptions (Decode (Image r cs e)) :: * Source #

type WriteOptions (Decode (Image r cs e)) :: * Source #

Methods

ext :: Decode (Image r cs e) -> String Source #

exts :: Decode (Image r cs e) -> [String] Source #

isFormat :: String -> Decode (Image r cs e) -> Bool Source #

FileFormat (Encode (Image r cs e)) Source # 

Associated Types

type ReadOptions (Encode (Image r cs e)) :: * Source #

type WriteOptions (Encode (Image r cs e)) :: * Source #

Methods

ext :: Encode (Image r cs e) -> String Source #

exts :: Encode (Image r cs e) -> [String] Source #

isFormat :: String -> Encode (Image r cs e) -> Bool Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 

Methods

encode :: Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 

Methods

encode :: Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYCbCr cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 

Methods

encode :: Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 

Methods

encode :: Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToY cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 

Methods

encode :: Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYA cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 

Methods

encode :: Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 

Methods

encode :: Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) Source # 
Writable (Encode (Image r cs e)) (Image r cs e) Source # 

Methods

encode :: Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto TIF) (Image r cs e) Source # 

Methods

decode :: Auto TIF -> ReadOptions (Auto TIF) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto TGA) (Image r cs e) Source # 

Methods

decode :: Auto TGA -> ReadOptions (Auto TGA) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto JPG) (Image r cs e) Source # 

Methods

decode :: Auto JPG -> ReadOptions (Auto JPG) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto HDR) (Image r cs e) Source # 

Methods

decode :: Auto HDR -> ReadOptions (Auto HDR) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto GIF) (Image r cs e) Source # 

Methods

decode :: Auto GIF -> ReadOptions (Auto GIF) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PNG) (Image r cs e) Source # 

Methods

decode :: Auto PNG -> ReadOptions (Auto PNG) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto BMP) (Image r cs e) Source # 

Methods

decode :: Auto BMP -> ReadOptions (Auto BMP) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PPM) (Image r cs e) Source # 

Methods

decode :: Auto PPM -> ReadOptions (Auto PPM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PGM) (Image r cs e) Source # 

Methods

decode :: Auto PGM -> ReadOptions (Auto PGM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PBM) (Image r cs e) Source # 

Methods

decode :: Auto PBM -> ReadOptions (Auto PBM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) Source # 
Readable (Decode (Image r cs e)) (Image r cs e) Source # 

Methods

decode :: Decode (Image r cs e) -> ReadOptions (Decode (Image r cs e)) -> ByteString -> Image r cs e Source #

(ColorSpace cs e, Bounded e) => Bounded (Pixel cs e) Source # 

Methods

minBound :: Pixel cs e #

maxBound :: Pixel cs e #

Eq e => Eq (Pixel HSIA e) # 

Methods

(==) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(/=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

Eq e => Eq (Pixel HSI e) # 

Methods

(==) :: Pixel HSI e -> Pixel HSI e -> Bool #

(/=) :: Pixel HSI e -> Pixel HSI e -> Bool #

Eq e => Eq (Pixel CMYKA e) # 

Methods

(==) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(/=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

Eq e => Eq (Pixel CMYK e) # 

Methods

(==) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(/=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

Eq e => Eq (Pixel RGBA e) # 

Methods

(==) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(/=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

Eq e => Eq (Pixel RGB e) # 

Methods

(==) :: Pixel RGB e -> Pixel RGB e -> Bool #

(/=) :: Pixel RGB e -> Pixel RGB e -> Bool #

Eq e => Eq (Pixel X e) # 

Methods

(==) :: Pixel X e -> Pixel X e -> Bool #

(/=) :: Pixel X e -> Pixel X e -> Bool #

Eq e => Eq (Pixel YA e) # 

Methods

(==) :: Pixel YA e -> Pixel YA e -> Bool #

(/=) :: Pixel YA e -> Pixel YA e -> Bool #

Eq e => Eq (Pixel Y e) # 

Methods

(==) :: Pixel Y e -> Pixel Y e -> Bool #

(/=) :: Pixel Y e -> Pixel Y e -> Bool #

Eq e => Eq (Pixel YCbCrA e) # 

Methods

(==) :: Pixel YCbCrA e -> Pixel YCbCrA e -> Bool #

(/=) :: Pixel YCbCrA e -> Pixel YCbCrA e -> Bool #

Eq e => Eq (Pixel YCbCr e) # 

Methods

(==) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(/=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(ColorSpace cs e, Floating e) => Floating (Pixel cs e) Source # 

Methods

pi :: Pixel cs e #

exp :: Pixel cs e -> Pixel cs e #

log :: Pixel cs e -> Pixel cs e #

sqrt :: Pixel cs e -> Pixel cs e #

(**) :: Pixel cs e -> Pixel cs e -> Pixel cs e #

logBase :: Pixel cs e -> Pixel cs e -> Pixel cs e #

sin :: Pixel cs e -> Pixel cs e #

cos :: Pixel cs e -> Pixel cs e #

tan :: Pixel cs e -> Pixel cs e #

asin :: Pixel cs e -> Pixel cs e #

acos :: Pixel cs e -> Pixel cs e #

atan :: Pixel cs e -> Pixel cs e #

sinh :: Pixel cs e -> Pixel cs e #

cosh :: Pixel cs e -> Pixel cs e #

tanh :: Pixel cs e -> Pixel cs e #

asinh :: Pixel cs e -> Pixel cs e #

acosh :: Pixel cs e -> Pixel cs e #

atanh :: Pixel cs e -> Pixel cs e #

log1p :: Pixel cs e -> Pixel cs e #

expm1 :: Pixel cs e -> Pixel cs e #

log1pexp :: Pixel cs e -> Pixel cs e #

log1mexp :: Pixel cs e -> Pixel cs e #

(ColorSpace cs e, Fractional e) => Fractional (Pixel cs e) Source # 

Methods

(/) :: Pixel cs e -> Pixel cs e -> Pixel cs e #

recip :: Pixel cs e -> Pixel cs e #

fromRational :: Rational -> Pixel cs e #

ColorSpace cs e => Num (Pixel cs e) Source # 

Methods

(+) :: Pixel cs e -> Pixel cs e -> Pixel cs e #

(-) :: Pixel cs e -> Pixel cs e -> Pixel cs e #

(*) :: Pixel cs e -> Pixel cs e -> Pixel cs e #

negate :: Pixel cs e -> Pixel cs e #

abs :: Pixel cs e -> Pixel cs e #

signum :: Pixel cs e -> Pixel cs e #

fromInteger :: Integer -> Pixel cs e #

Ord e => Ord (Pixel HSIA e) # 

Methods

compare :: Pixel HSIA e -> Pixel HSIA e -> Ordering #

(<) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(<=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(>) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(>=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

max :: Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e #

min :: Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e #

Ord e => Ord (Pixel HSI e) # 

Methods

compare :: Pixel HSI e -> Pixel HSI e -> Ordering #

(<) :: Pixel HSI e -> Pixel HSI e -> Bool #

(<=) :: Pixel HSI e -> Pixel HSI e -> Bool #

(>) :: Pixel HSI e -> Pixel HSI e -> Bool #

(>=) :: Pixel HSI e -> Pixel HSI e -> Bool #

max :: Pixel HSI e -> Pixel HSI e -> Pixel HSI e #

min :: Pixel HSI e -> Pixel HSI e -> Pixel HSI e #

Ord e => Ord (Pixel CMYKA e) # 

Methods

compare :: Pixel CMYKA e -> Pixel CMYKA e -> Ordering #

(<) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(<=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(>) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(>=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

max :: Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e #

min :: Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e #

Ord e => Ord (Pixel CMYK e) # 

Methods

compare :: Pixel CMYK e -> Pixel CMYK e -> Ordering #

(<) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(<=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(>) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(>=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

max :: Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e #

min :: Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e #

Ord e => Ord (Pixel RGBA e) # 

Methods

compare :: Pixel RGBA e -> Pixel RGBA e -> Ordering #

(<) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(<=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(>) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(>=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

max :: Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e #

min :: Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e #

Ord e => Ord (Pixel RGB e) # 

Methods

compare :: Pixel RGB e -> Pixel RGB e -> Ordering #

(<) :: Pixel RGB e -> Pixel RGB e -> Bool #

(<=) :: Pixel RGB e -> Pixel RGB e -> Bool #

(>) :: Pixel RGB e -> Pixel RGB e -> Bool #

(>=) :: Pixel RGB e -> Pixel RGB e -> Bool #

max :: Pixel RGB e -> Pixel RGB e -> Pixel RGB e #

min :: Pixel RGB e -> Pixel RGB e -> Pixel RGB e #

Ord e => Ord (Pixel X e) # 

Methods

compare :: Pixel X e -> Pixel X e -> Ordering #

(<) :: Pixel X e -> Pixel X e -> Bool #

(<=) :: Pixel X e -> Pixel X e -> Bool #

(>) :: Pixel X e -> Pixel X e -> Bool #

(>=) :: Pixel X e -> Pixel X e -> Bool #

max :: Pixel X e -> Pixel X e -> Pixel X e #

min :: Pixel X e -> Pixel X e -> Pixel X e #

Ord e => Ord (Pixel YA e) # 

Methods

compare :: Pixel YA e -> Pixel YA e -> Ordering #

(<) :: Pixel YA e -> Pixel YA e -> Bool #

(<=) :: Pixel YA e -> Pixel YA e -> Bool #

(>) :: Pixel YA e -> Pixel YA e -> Bool #

(>=) :: Pixel YA e -> Pixel YA e -> Bool #

max :: Pixel YA e -> Pixel YA e -> Pixel YA e #

min :: Pixel YA e -> Pixel YA e -> Pixel YA e #

Ord e => Ord (Pixel Y e) # 

Methods

compare :: Pixel Y e -> Pixel Y e -> Ordering #

(<) :: Pixel Y e -> Pixel Y e -> Bool #

(<=) :: Pixel Y e -> Pixel Y e -> Bool #

(>) :: Pixel Y e -> Pixel Y e -> Bool #

(>=) :: Pixel Y e -> Pixel Y e -> Bool #

max :: Pixel Y e -> Pixel Y e -> Pixel Y e #

min :: Pixel Y e -> Pixel Y e -> Pixel Y e #

Ord e => Ord (Pixel YCbCrA e) # 
Ord e => Ord (Pixel YCbCr e) # 

Methods

compare :: Pixel YCbCr e -> Pixel YCbCr e -> Ordering #

(<) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(<=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(>) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(>=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

max :: Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e #

min :: Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e #

Show e => Show (Pixel HSIA e) # 

Methods

showsPrec :: Int -> Pixel HSIA e -> ShowS #

show :: Pixel HSIA e -> String #

showList :: [Pixel HSIA e] -> ShowS #

Show e => Show (Pixel HSI e) # 

Methods

showsPrec :: Int -> Pixel HSI e -> ShowS #

show :: Pixel HSI e -> String #

showList :: [Pixel HSI e] -> ShowS #

Show e => Show (Pixel CMYKA e) # 

Methods

showsPrec :: Int -> Pixel CMYKA e -> ShowS #

show :: Pixel CMYKA e -> String #

showList :: [Pixel CMYKA e] -> ShowS #

Show e => Show (Pixel CMYK e) # 

Methods

showsPrec :: Int -> Pixel CMYK e -> ShowS #

show :: Pixel CMYK e -> String #

showList :: [Pixel CMYK e] -> ShowS #

Show e => Show (Pixel RGBA e) # 

Methods

showsPrec :: Int -> Pixel RGBA e -> ShowS #

show :: Pixel RGBA e -> String #

showList :: [Pixel RGBA e] -> ShowS #

Show e => Show (Pixel RGB e) # 

Methods

showsPrec :: Int -> Pixel RGB e -> ShowS #

show :: Pixel RGB e -> String #

showList :: [Pixel RGB e] -> ShowS #

Show e => Show (Pixel X e) # 

Methods

showsPrec :: Int -> Pixel X e -> ShowS #

show :: Pixel X e -> String #

showList :: [Pixel X e] -> ShowS #

Show e => Show (Pixel YA e) # 

Methods

showsPrec :: Int -> Pixel YA e -> ShowS #

show :: Pixel YA e -> String #

showList :: [Pixel YA e] -> ShowS #

Show e => Show (Pixel Y e) # 

Methods

showsPrec :: Int -> Pixel Y e -> ShowS #

show :: Pixel Y e -> String #

showList :: [Pixel Y e] -> ShowS #

Show e => Show (Pixel YCbCrA e) # 
Show e => Show (Pixel YCbCr e) # 

Methods

showsPrec :: Int -> Pixel YCbCr e -> ShowS #

show :: Pixel YCbCr e -> String #

showList :: [Pixel YCbCr e] -> ShowS #

Storable e => Storable (Pixel HSIA e) # 

Methods

sizeOf :: Pixel HSIA e -> Int #

alignment :: Pixel HSIA e -> Int #

peekElemOff :: Ptr (Pixel HSIA e) -> Int -> IO (Pixel HSIA e) #

pokeElemOff :: Ptr (Pixel HSIA e) -> Int -> Pixel HSIA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel HSIA e) #

pokeByteOff :: Ptr b -> Int -> Pixel HSIA e -> IO () #

peek :: Ptr (Pixel HSIA e) -> IO (Pixel HSIA e) #

poke :: Ptr (Pixel HSIA e) -> Pixel HSIA e -> IO () #

Storable e => Storable (Pixel HSI e) # 

Methods

sizeOf :: Pixel HSI e -> Int #

alignment :: Pixel HSI e -> Int #

peekElemOff :: Ptr (Pixel HSI e) -> Int -> IO (Pixel HSI e) #

pokeElemOff :: Ptr (Pixel HSI e) -> Int -> Pixel HSI e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel HSI e) #

pokeByteOff :: Ptr b -> Int -> Pixel HSI e -> IO () #

peek :: Ptr (Pixel HSI e) -> IO (Pixel HSI e) #

poke :: Ptr (Pixel HSI e) -> Pixel HSI e -> IO () #

Storable e => Storable (Pixel CMYKA e) # 

Methods

sizeOf :: Pixel CMYKA e -> Int #

alignment :: Pixel CMYKA e -> Int #

peekElemOff :: Ptr (Pixel CMYKA e) -> Int -> IO (Pixel CMYKA e) #

pokeElemOff :: Ptr (Pixel CMYKA e) -> Int -> Pixel CMYKA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel CMYKA e) #

pokeByteOff :: Ptr b -> Int -> Pixel CMYKA e -> IO () #

peek :: Ptr (Pixel CMYKA e) -> IO (Pixel CMYKA e) #

poke :: Ptr (Pixel CMYKA e) -> Pixel CMYKA e -> IO () #

Storable e => Storable (Pixel CMYK e) # 

Methods

sizeOf :: Pixel CMYK e -> Int #

alignment :: Pixel CMYK e -> Int #

peekElemOff :: Ptr (Pixel CMYK e) -> Int -> IO (Pixel CMYK e) #

pokeElemOff :: Ptr (Pixel CMYK e) -> Int -> Pixel CMYK e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel CMYK e) #

pokeByteOff :: Ptr b -> Int -> Pixel CMYK e -> IO () #

peek :: Ptr (Pixel CMYK e) -> IO (Pixel CMYK e) #

poke :: Ptr (Pixel CMYK e) -> Pixel CMYK e -> IO () #

Storable e => Storable (Pixel RGBA e) # 

Methods

sizeOf :: Pixel RGBA e -> Int #

alignment :: Pixel RGBA e -> Int #

peekElemOff :: Ptr (Pixel RGBA e) -> Int -> IO (Pixel RGBA e) #

pokeElemOff :: Ptr (Pixel RGBA e) -> Int -> Pixel RGBA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel RGBA e) #

pokeByteOff :: Ptr b -> Int -> Pixel RGBA e -> IO () #

peek :: Ptr (Pixel RGBA e) -> IO (Pixel RGBA e) #

poke :: Ptr (Pixel RGBA e) -> Pixel RGBA e -> IO () #

Storable e => Storable (Pixel RGB e) # 

Methods

sizeOf :: Pixel RGB e -> Int #

alignment :: Pixel RGB e -> Int #

peekElemOff :: Ptr (Pixel RGB e) -> Int -> IO (Pixel RGB e) #

pokeElemOff :: Ptr (Pixel RGB e) -> Int -> Pixel RGB e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel RGB e) #

pokeByteOff :: Ptr b -> Int -> Pixel RGB e -> IO () #

peek :: Ptr (Pixel RGB e) -> IO (Pixel RGB e) #

poke :: Ptr (Pixel RGB e) -> Pixel RGB e -> IO () #

Storable e => Storable (Pixel X e) # 

Methods

sizeOf :: Pixel X e -> Int #

alignment :: Pixel X e -> Int #

peekElemOff :: Ptr (Pixel X e) -> Int -> IO (Pixel X e) #

pokeElemOff :: Ptr (Pixel X e) -> Int -> Pixel X e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel X e) #

pokeByteOff :: Ptr b -> Int -> Pixel X e -> IO () #

peek :: Ptr (Pixel X e) -> IO (Pixel X e) #

poke :: Ptr (Pixel X e) -> Pixel X e -> IO () #

Storable e => Storable (Pixel YA e) # 

Methods

sizeOf :: Pixel YA e -> Int #

alignment :: Pixel YA e -> Int #

peekElemOff :: Ptr (Pixel YA e) -> Int -> IO (Pixel YA e) #

pokeElemOff :: Ptr (Pixel YA e) -> Int -> Pixel YA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel YA e) #

pokeByteOff :: Ptr b -> Int -> Pixel YA e -> IO () #

peek :: Ptr (Pixel YA e) -> IO (Pixel YA e) #

poke :: Ptr (Pixel YA e) -> Pixel YA e -> IO () #

Storable e => Storable (Pixel Y e) # 

Methods

sizeOf :: Pixel Y e -> Int #

alignment :: Pixel Y e -> Int #

peekElemOff :: Ptr (Pixel Y e) -> Int -> IO (Pixel Y e) #

pokeElemOff :: Ptr (Pixel Y e) -> Int -> Pixel Y e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel Y e) #

pokeByteOff :: Ptr b -> Int -> Pixel Y e -> IO () #

peek :: Ptr (Pixel Y e) -> IO (Pixel Y e) #

poke :: Ptr (Pixel Y e) -> Pixel Y e -> IO () #

Storable e => Storable (Pixel YCbCrA e) # 

Methods

sizeOf :: Pixel YCbCrA e -> Int #

alignment :: Pixel YCbCrA e -> Int #

peekElemOff :: Ptr (Pixel YCbCrA e) -> Int -> IO (Pixel YCbCrA e) #

pokeElemOff :: Ptr (Pixel YCbCrA e) -> Int -> Pixel YCbCrA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel YCbCrA e) #

pokeByteOff :: Ptr b -> Int -> Pixel YCbCrA e -> IO () #

peek :: Ptr (Pixel YCbCrA e) -> IO (Pixel YCbCrA e) #

poke :: Ptr (Pixel YCbCrA e) -> Pixel YCbCrA e -> IO () #

Storable e => Storable (Pixel YCbCr e) # 

Methods

sizeOf :: Pixel YCbCr e -> Int #

alignment :: Pixel YCbCr e -> Int #

peekElemOff :: Ptr (Pixel YCbCr e) -> Int -> IO (Pixel YCbCr e) #

pokeElemOff :: Ptr (Pixel YCbCr e) -> Int -> Pixel YCbCr e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel YCbCr e) #

pokeByteOff :: Ptr b -> Int -> Pixel YCbCr e -> IO () #

peek :: Ptr (Pixel YCbCr e) -> IO (Pixel YCbCr e) #

poke :: Ptr (Pixel YCbCr e) -> Pixel YCbCr e -> IO () #

Bits (Pixel X Bit) # 
ColorSpace cs e => Default (Pixel cs e) Source # 

Methods

def :: Pixel cs e #

(ColorSpace cs e, NFData e) => NFData (Pixel cs e) Source # 

Methods

rnf :: Pixel cs e -> () #

ColorSpace cs e => Unbox (Pixel cs e) Source #

Unboxing of a Pixel.

data Pixel HSIA Source # 
data Pixel HSIA = PixelHSIA !e !e !e !e
data Pixel HSI Source # 
data Pixel HSI = PixelHSI !e !e !e
data Pixel CMYKA Source # 
data Pixel CMYKA = PixelCMYKA !e !e !e !e !e
data Pixel CMYK Source # 
data Pixel CMYK = PixelCMYK !e !e !e !e
data Pixel RGBA Source # 
data Pixel RGBA = PixelRGBA !e !e !e !e
data Pixel RGB Source # 
data Pixel RGB = PixelRGB !e !e !e
data Pixel X Source # 
data Pixel X = PixelX {}
data Pixel YA Source # 
data Pixel YA = PixelYA !e !e
data Pixel Y Source # 
data Pixel Y = PixelY e
data Pixel YCbCrA Source # 
data Pixel YCbCrA = PixelYCbCrA !e !e !e !e
data Pixel YCbCr Source # 
data Pixel YCbCr = PixelYCbCr !e !e !e
data MVector s (Pixel cs e) Source # 
data MVector s (Pixel cs e) = MV_Pixel (MVector s (Components cs e))
type ReadOptions (Decode (Image r cs e)) Source # 
type ReadOptions (Decode (Image r cs e)) = ()
type ReadOptions (Encode (Image r cs e)) Source # 
type ReadOptions (Encode (Image r cs e)) = ()
type WriteOptions (Decode (Image r cs e)) Source # 
type WriteOptions (Decode (Image r cs e)) = ()
type WriteOptions (Encode (Image r cs e)) Source # 
type WriteOptions (Encode (Image r cs e)) = ()
data Vector (Pixel cs e) Source # 
data Vector (Pixel cs e) = V_Pixel (Vector (Components cs e))

class (Eq cs, Enum cs, Show cs, Bounded cs, Typeable cs, Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Eq (Pixel cs e), Unbox (Components cs e), Storable (Pixel cs e), Elevator e) => ColorSpace cs e where Source #

Minimal complete definition

toComponents, fromComponents, getPxC, setPxC, mapPxC, foldlPx2

Associated Types

type Components cs e Source #

Methods

toComponents :: Pixel cs e -> Components cs e Source #

Convert a Pixel to a representation suitable for storage as an unboxed element, usually a tuple of channels.

fromComponents :: Components cs e -> Pixel cs e Source #

Convert from an elemnt representation back to a Pixel.

promote :: e -> Pixel cs e Source #

Deprecated: Use pure from Applicative instead

Construt a Pixel by replicating the same value across all of the components.

getPxC :: Pixel cs e -> cs -> e Source #

Retrieve Pixel's component value

setPxC :: Pixel cs e -> cs -> e -> Pixel cs e Source #

Set Pixel's component value

mapPxC :: (cs -> e -> e) -> Pixel cs e -> Pixel cs e Source #

Map a channel aware function over all Pixel's components.

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel cs e -> Pixel cs e -> b Source #

Left fold on two pixels a the same time. If accumulator is nutrual to the folding funciton then it's equivalent to foldlPx2 f acc px1 px2 == foldl' acc (liftA2 (f acc) px1 px2)

liftPx :: (e -> e) -> Pixel cs e -> Pixel cs e Source #

Deprecated: Use fmap from Functor instead

Map a function over all Pixel's componenets.

liftPx2 :: (e -> e -> e) -> Pixel cs e -> Pixel cs e -> Pixel cs e Source #

Deprecated: Use liftA2 from Applicative instead

Zip two Pixels with a function.

foldrPx :: (e -> b -> b) -> b -> Pixel cs e -> b Source #

Deprecated: Use foldr' from Foldable instead

Right fold over all Pixel's components.

foldlPx :: (b -> e -> b) -> b -> Pixel cs e -> b Source #

Deprecated: Use foldl' from Foldable instead

Left strict fold over all Pixel's components.

foldl1Px :: (e -> e -> e) -> Pixel cs e -> e Source #

Deprecated: Use foldl1 from Foldable instead

Instances

Elevator e => ColorSpace HSIA e Source # 

Associated Types

type Components HSIA e :: * Source #

Methods

toComponents :: Pixel HSIA e -> Components HSIA e Source #

fromComponents :: Components HSIA e -> Pixel HSIA e Source #

promote :: e -> Pixel HSIA e Source #

getPxC :: Pixel HSIA e -> HSIA -> e Source #

setPxC :: Pixel HSIA e -> HSIA -> e -> Pixel HSIA e Source #

mapPxC :: (HSIA -> e -> e) -> Pixel HSIA e -> Pixel HSIA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel HSIA e -> Pixel HSIA e -> b Source #

liftPx :: (e -> e) -> Pixel HSIA e -> Pixel HSIA e Source #

liftPx2 :: (e -> e -> e) -> Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel HSIA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel HSIA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel HSIA e -> e Source #

Elevator e => ColorSpace HSI e Source # 

Associated Types

type Components HSI e :: * Source #

Methods

toComponents :: Pixel HSI e -> Components HSI e Source #

fromComponents :: Components HSI e -> Pixel HSI e Source #

promote :: e -> Pixel HSI e Source #

getPxC :: Pixel HSI e -> HSI -> e Source #

setPxC :: Pixel HSI e -> HSI -> e -> Pixel HSI e Source #

mapPxC :: (HSI -> e -> e) -> Pixel HSI e -> Pixel HSI e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel HSI e -> Pixel HSI e -> b Source #

liftPx :: (e -> e) -> Pixel HSI e -> Pixel HSI e Source #

liftPx2 :: (e -> e -> e) -> Pixel HSI e -> Pixel HSI e -> Pixel HSI e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel HSI e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel HSI e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel HSI e -> e Source #

Elevator e => ColorSpace CMYKA e Source # 

Associated Types

type Components CMYKA e :: * Source #

Methods

toComponents :: Pixel CMYKA e -> Components CMYKA e Source #

fromComponents :: Components CMYKA e -> Pixel CMYKA e Source #

promote :: e -> Pixel CMYKA e Source #

getPxC :: Pixel CMYKA e -> CMYKA -> e Source #

setPxC :: Pixel CMYKA e -> CMYKA -> e -> Pixel CMYKA e Source #

mapPxC :: (CMYKA -> e -> e) -> Pixel CMYKA e -> Pixel CMYKA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel CMYKA e -> Pixel CMYKA e -> b Source #

liftPx :: (e -> e) -> Pixel CMYKA e -> Pixel CMYKA e Source #

liftPx2 :: (e -> e -> e) -> Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel CMYKA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel CMYKA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel CMYKA e -> e Source #

Elevator e => ColorSpace CMYK e Source # 

Associated Types

type Components CMYK e :: * Source #

Methods

toComponents :: Pixel CMYK e -> Components CMYK e Source #

fromComponents :: Components CMYK e -> Pixel CMYK e Source #

promote :: e -> Pixel CMYK e Source #

getPxC :: Pixel CMYK e -> CMYK -> e Source #

setPxC :: Pixel CMYK e -> CMYK -> e -> Pixel CMYK e Source #

mapPxC :: (CMYK -> e -> e) -> Pixel CMYK e -> Pixel CMYK e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel CMYK e -> Pixel CMYK e -> b Source #

liftPx :: (e -> e) -> Pixel CMYK e -> Pixel CMYK e Source #

liftPx2 :: (e -> e -> e) -> Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel CMYK e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel CMYK e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel CMYK e -> e Source #

Elevator e => ColorSpace RGBA e Source # 

Associated Types

type Components RGBA e :: * Source #

Methods

toComponents :: Pixel RGBA e -> Components RGBA e Source #

fromComponents :: Components RGBA e -> Pixel RGBA e Source #

promote :: e -> Pixel RGBA e Source #

getPxC :: Pixel RGBA e -> RGBA -> e Source #

setPxC :: Pixel RGBA e -> RGBA -> e -> Pixel RGBA e Source #

mapPxC :: (RGBA -> e -> e) -> Pixel RGBA e -> Pixel RGBA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel RGBA e -> Pixel RGBA e -> b Source #

liftPx :: (e -> e) -> Pixel RGBA e -> Pixel RGBA e Source #

liftPx2 :: (e -> e -> e) -> Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel RGBA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel RGBA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel RGBA e -> e Source #

Elevator e => ColorSpace RGB e Source # 

Associated Types

type Components RGB e :: * Source #

Methods

toComponents :: Pixel RGB e -> Components RGB e Source #

fromComponents :: Components RGB e -> Pixel RGB e Source #

promote :: e -> Pixel RGB e Source #

getPxC :: Pixel RGB e -> RGB -> e Source #

setPxC :: Pixel RGB e -> RGB -> e -> Pixel RGB e Source #

mapPxC :: (RGB -> e -> e) -> Pixel RGB e -> Pixel RGB e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel RGB e -> Pixel RGB e -> b Source #

liftPx :: (e -> e) -> Pixel RGB e -> Pixel RGB e Source #

liftPx2 :: (e -> e -> e) -> Pixel RGB e -> Pixel RGB e -> Pixel RGB e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel RGB e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel RGB e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel RGB e -> e Source #

Elevator e => ColorSpace X e Source # 

Associated Types

type Components X e :: * Source #

Methods

toComponents :: Pixel X e -> Components X e Source #

fromComponents :: Components X e -> Pixel X e Source #

promote :: e -> Pixel X e Source #

getPxC :: Pixel X e -> X -> e Source #

setPxC :: Pixel X e -> X -> e -> Pixel X e Source #

mapPxC :: (X -> e -> e) -> Pixel X e -> Pixel X e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel X e -> Pixel X e -> b Source #

liftPx :: (e -> e) -> Pixel X e -> Pixel X e Source #

liftPx2 :: (e -> e -> e) -> Pixel X e -> Pixel X e -> Pixel X e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel X e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel X e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel X e -> e Source #

Elevator e => ColorSpace YA e Source # 

Associated Types

type Components YA e :: * Source #

Methods

toComponents :: Pixel YA e -> Components YA e Source #

fromComponents :: Components YA e -> Pixel YA e Source #

promote :: e -> Pixel YA e Source #

getPxC :: Pixel YA e -> YA -> e Source #

setPxC :: Pixel YA e -> YA -> e -> Pixel YA e Source #

mapPxC :: (YA -> e -> e) -> Pixel YA e -> Pixel YA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YA e -> Pixel YA e -> b Source #

liftPx :: (e -> e) -> Pixel YA e -> Pixel YA e Source #

liftPx2 :: (e -> e -> e) -> Pixel YA e -> Pixel YA e -> Pixel YA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YA e -> e Source #

Elevator e => ColorSpace Y e Source # 

Associated Types

type Components Y e :: * Source #

Methods

toComponents :: Pixel Y e -> Components Y e Source #

fromComponents :: Components Y e -> Pixel Y e Source #

promote :: e -> Pixel Y e Source #

getPxC :: Pixel Y e -> Y -> e Source #

setPxC :: Pixel Y e -> Y -> e -> Pixel Y e Source #

mapPxC :: (Y -> e -> e) -> Pixel Y e -> Pixel Y e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel Y e -> Pixel Y e -> b Source #

liftPx :: (e -> e) -> Pixel Y e -> Pixel Y e Source #

liftPx2 :: (e -> e -> e) -> Pixel Y e -> Pixel Y e -> Pixel Y e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel Y e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel Y e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel Y e -> e Source #

Elevator e => ColorSpace YCbCrA e Source # 

Associated Types

type Components YCbCrA e :: * Source #

Methods

toComponents :: Pixel YCbCrA e -> Components YCbCrA e Source #

fromComponents :: Components YCbCrA e -> Pixel YCbCrA e Source #

promote :: e -> Pixel YCbCrA e Source #

getPxC :: Pixel YCbCrA e -> YCbCrA -> e Source #

setPxC :: Pixel YCbCrA e -> YCbCrA -> e -> Pixel YCbCrA e Source #

mapPxC :: (YCbCrA -> e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YCbCrA e -> Pixel YCbCrA e -> b Source #

liftPx :: (e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

liftPx2 :: (e -> e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YCbCrA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YCbCrA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YCbCrA e -> e Source #

Elevator e => ColorSpace YCbCr e Source # 

Associated Types

type Components YCbCr e :: * Source #

Methods

toComponents :: Pixel YCbCr e -> Components YCbCr e Source #

fromComponents :: Components YCbCr e -> Pixel YCbCr e Source #

promote :: e -> Pixel YCbCr e Source #

getPxC :: Pixel YCbCr e -> YCbCr -> e Source #

setPxC :: Pixel YCbCr e -> YCbCr -> e -> Pixel YCbCr e Source #

mapPxC :: (YCbCr -> e -> e) -> Pixel YCbCr e -> Pixel YCbCr e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YCbCr e -> Pixel YCbCr e -> b Source #

liftPx :: (e -> e) -> Pixel YCbCr e -> Pixel YCbCr e Source #

liftPx2 :: (e -> e -> e) -> Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YCbCr e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YCbCr e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YCbCr e -> e Source #

class (ColorSpace (Opaque cs) e, ColorSpace cs e) => AlphaSpace cs e where Source #

A color space that supports transparency.

Minimal complete definition

getAlpha, addAlpha, dropAlpha

Associated Types

type Opaque cs Source #

A corresponding opaque version of this color space.

Methods

getAlpha :: Pixel cs e -> e Source #

Get an alpha channel of a transparant pixel.

addAlpha :: e -> Pixel (Opaque cs) e -> Pixel cs e Source #

Add an alpha channel to an opaque pixel.

 addAlpha 0 (PixelHSI 1 2 3) == PixelHSIA 1 2 3 0

dropAlpha :: Pixel cs e -> Pixel (Opaque cs) e Source #

Convert a transparent pixel to an opaque one by dropping the alpha channel.

 dropAlpha (PixelRGBA 1 2 3 4) == PixelRGB 1 2 3

Instances

Elevator e => AlphaSpace HSIA e Source # 

Associated Types

type Opaque HSIA :: * Source #

Elevator e => AlphaSpace CMYKA e Source # 

Associated Types

type Opaque CMYKA :: * Source #

Elevator e => AlphaSpace RGBA e Source # 

Associated Types

type Opaque RGBA :: * Source #

Elevator e => AlphaSpace YA e Source # 

Associated Types

type Opaque YA :: * Source #

Methods

getAlpha :: Pixel YA e -> e Source #

addAlpha :: e -> Pixel (Opaque YA) e -> Pixel YA e Source #

dropAlpha :: Pixel YA e -> Pixel (Opaque YA) e Source #

Elevator e => AlphaSpace YCbCrA e Source # 

Associated Types

type Opaque YCbCrA :: * Source #

Luma (gray scale)

Conversion to Luma from other color spaces.

toPixelY :: ToY cs e => Pixel cs e -> Pixel Y Double Source #

Convert a pixel to Luma pixel.

toPixelYA :: ToYA cs e => Pixel cs e -> Pixel YA Double Source #

Convert a pixel to Luma pixel with Alpha.

RGB

Conversion to RGB from other color spaces.

toPixelRGB :: ToRGB cs e => Pixel cs e -> Pixel RGB Double Source #

Convert to an RGB pixel.

toPixelRGBA :: ToRGBA cs e => Pixel cs e -> Pixel RGBA Double Source #

Convert to an RGBA pixel.

HSI

Conversion to HSI from other color spaces.

toPixelHSI :: ToHSI cs e => Pixel cs e -> Pixel HSI Double Source #

Convert to an HSI pixel.

toPixelHSIA :: ToHSIA cs e => Pixel cs e -> Pixel HSIA Double Source #

Convert to an HSIA pixel.

CMYK

Conversion to CMYK from other color spaces.

toPixelCMYK :: ToCMYK cs e => Pixel cs e -> Pixel CMYK Double Source #

Convert to a CMYK pixel.

toPixelCMYKA :: ToCMYKA cs e => Pixel cs e -> Pixel CMYKA Double Source #

Convert to a CMYKA pixel.

YCbCr

Conversion to YCbCr from other color spaces.

toPixelYCbCr :: ToYCbCr cs e => Pixel cs e -> Pixel YCbCr Double Source #

Convert to an YCbCr pixel.

toPixelYCbCrA :: ToYCbCrA cs e => Pixel cs e -> Pixel YCbCrA Double Source #

Convert to an YCbCrA pixel.

Binary

This is a Binary colorspace, pixel's of which can be created using these constructors:

on
Represents value 1 or True. It's a foreground pixel and is displayed in black.
off
Represents value 0 or False. It's a background pixel and is displayed in white.

Note, that values are inverted before writing to or reading from file, since grayscale images represent black as a 0 value and white as 1 on a [0,1] scale.

Binary pixels also behave as binary numbers with a size of 1-bit, for instance:

>>> on + on -- equivalent to: 1 .|. 1
<Binary:(1)>
>>> (on + on) * off -- equivalent to: (1 .|. 1) .&. 0
<Binary:(0)>
>>> (on + on) - on
<Binary:(0)>

toPixelBinary :: ColorSpace cs e => Pixel cs e -> Pixel X Bit Source #

Convert to a Binary pixel.

fromPixelBinary :: Pixel X Bit -> Pixel Y Word8 Source #

Convert a Binary pixel to Luma pixel

Complex

X

toPixelsX :: ColorSpace cs e => Pixel cs e -> [Pixel X e] Source #

Separate a Pixel into a list of components with X pixels containing every component from the pixel.

>>> toPixelsX (PixelRGB 4 5 6)
[<X:(4)>,<X:(5)>,<X:(6)>]

fromPixelsX :: ColorSpace cs e => [(cs, Pixel X e)] -> Pixel cs e Source #

Combine a list of X pixels into a Pixel with a specified channel order. Not the most efficient way to construct a pixel, but might prove useful to someone.

>>> fromPixelsX [(RedRGB, 3), (BlueRGB, 5), (GreenRGB, 4)]
<RGB:(3.0|4.0|5.0)>
>>> fromPixelsX $ zip (enumFrom RedRGB) (toPixelsX $ PixelRGB 4 5 6)
<RGB:(4.0|5.0|6.0)>

ColorSpace

Operations on Pixels

eqTolPx :: (ColorSpace cs e, Ord e) => e -> Pixel cs e -> Pixel cs e -> Bool Source #

Check weather two Pixels are equal within a tolerance. Useful for comparing pixels with Float or Double precision.

Luma

data Y Source #

Luma or brightness, which is usually denoted as Y'.

Constructors

LumaY 

Instances

Bounded Y Source # 

Methods

minBound :: Y #

maxBound :: Y #

Enum Y Source # 

Methods

succ :: Y -> Y #

pred :: Y -> Y #

toEnum :: Int -> Y #

fromEnum :: Y -> Int #

enumFrom :: Y -> [Y] #

enumFromThen :: Y -> Y -> [Y] #

enumFromTo :: Y -> Y -> [Y] #

enumFromThenTo :: Y -> Y -> Y -> [Y] #

Eq Y Source # 

Methods

(==) :: Y -> Y -> Bool #

(/=) :: Y -> Y -> Bool #

Show Y Source # 

Methods

showsPrec :: Int -> Y -> ShowS #

show :: Y -> String #

showList :: [Y] -> ShowS #

Elevator e => ColorSpace Y e Source # 

Associated Types

type Components Y e :: * Source #

Methods

toComponents :: Pixel Y e -> Components Y e Source #

fromComponents :: Components Y e -> Pixel Y e Source #

promote :: e -> Pixel Y e Source #

getPxC :: Pixel Y e -> Y -> e Source #

setPxC :: Pixel Y e -> Y -> e -> Pixel Y e Source #

mapPxC :: (Y -> e -> e) -> Pixel Y e -> Pixel Y e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel Y e -> Pixel Y e -> b Source #

liftPx :: (e -> e) -> Pixel Y e -> Pixel Y e Source #

liftPx2 :: (e -> e -> e) -> Pixel Y e -> Pixel Y e -> Pixel Y e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel Y e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel Y e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel Y e -> e Source #

ToYCbCr Y e => ToYCbCrA Y e Source # 
Elevator e => ToYCbCr Y e Source # 
ToCMYK Y e => ToCMYKA Y e Source # 
Elevator e => ToCMYK Y e Source # 
ToHSI Y e => ToHSIA Y e Source # 
Elevator e => ToHSI Y e Source # 
ToRGB Y e => ToRGBA Y e Source # 
Elevator e => ToRGB Y e Source # 
ToY Y e => ToYA Y e Source # 
Elevator e => ToY Y e Source # 

Methods

toPixelY :: Pixel Y e -> Pixel Y Double Source #

Monad (Pixel Y) Source # 

Methods

(>>=) :: Pixel Y a -> (a -> Pixel Y b) -> Pixel Y b #

(>>) :: Pixel Y a -> Pixel Y b -> Pixel Y b #

return :: a -> Pixel Y a #

fail :: String -> Pixel Y a #

Functor (Pixel Y) Source # 

Methods

fmap :: (a -> b) -> Pixel Y a -> Pixel Y b #

(<$) :: a -> Pixel Y b -> Pixel Y a #

Applicative (Pixel Y) Source # 

Methods

pure :: a -> Pixel Y a #

(<*>) :: Pixel Y (a -> b) -> Pixel Y a -> Pixel Y b #

liftA2 :: (a -> b -> c) -> Pixel Y a -> Pixel Y b -> Pixel Y c #

(*>) :: Pixel Y a -> Pixel Y b -> Pixel Y b #

(<*) :: Pixel Y a -> Pixel Y b -> Pixel Y a #

Foldable (Pixel Y) Source # 

Methods

fold :: Monoid m => Pixel Y m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel Y a -> m #

foldr :: (a -> b -> b) -> b -> Pixel Y a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel Y a -> b #

foldl :: (b -> a -> b) -> b -> Pixel Y a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel Y a -> b #

foldr1 :: (a -> a -> a) -> Pixel Y a -> a #

foldl1 :: (a -> a -> a) -> Pixel Y a -> a #

toList :: Pixel Y a -> [a] #

null :: Pixel Y a -> Bool #

length :: Pixel Y a -> Int #

elem :: Eq a => a -> Pixel Y a -> Bool #

maximum :: Ord a => Pixel Y a -> a #

minimum :: Ord a => Pixel Y a -> a #

sum :: Num a => Pixel Y a -> a #

product :: Num a => Pixel Y a -> a #

Eq e => Eq (Pixel Y e) Source # 

Methods

(==) :: Pixel Y e -> Pixel Y e -> Bool #

(/=) :: Pixel Y e -> Pixel Y e -> Bool #

Ord e => Ord (Pixel Y e) Source # 

Methods

compare :: Pixel Y e -> Pixel Y e -> Ordering #

(<) :: Pixel Y e -> Pixel Y e -> Bool #

(<=) :: Pixel Y e -> Pixel Y e -> Bool #

(>) :: Pixel Y e -> Pixel Y e -> Bool #

(>=) :: Pixel Y e -> Pixel Y e -> Bool #

max :: Pixel Y e -> Pixel Y e -> Pixel Y e #

min :: Pixel Y e -> Pixel Y e -> Pixel Y e #

Show e => Show (Pixel Y e) Source # 

Methods

showsPrec :: Int -> Pixel Y e -> ShowS #

show :: Pixel Y e -> String #

showList :: [Pixel Y e] -> ShowS #

Storable e => Storable (Pixel Y e) Source # 

Methods

sizeOf :: Pixel Y e -> Int #

alignment :: Pixel Y e -> Int #

peekElemOff :: Ptr (Pixel Y e) -> Int -> IO (Pixel Y e) #

pokeElemOff :: Ptr (Pixel Y e) -> Int -> Pixel Y e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel Y e) #

pokeByteOff :: Ptr b -> Int -> Pixel Y e -> IO () #

peek :: Ptr (Pixel Y e) -> IO (Pixel Y e) #

poke :: Ptr (Pixel Y e) -> Pixel Y e -> IO () #

data Pixel Y Source # 
data Pixel Y = PixelY e
type Components Y e Source # 
type Components Y e = e

data YA Source #

Luma with Alpha channel.

Constructors

LumaYA

Luma

AlphaYA

Alpha channel

Instances

Bounded YA Source # 

Methods

minBound :: YA #

maxBound :: YA #

Enum YA Source # 

Methods

succ :: YA -> YA #

pred :: YA -> YA #

toEnum :: Int -> YA #

fromEnum :: YA -> Int #

enumFrom :: YA -> [YA] #

enumFromThen :: YA -> YA -> [YA] #

enumFromTo :: YA -> YA -> [YA] #

enumFromThenTo :: YA -> YA -> YA -> [YA] #

Eq YA Source # 

Methods

(==) :: YA -> YA -> Bool #

(/=) :: YA -> YA -> Bool #

Show YA Source # 

Methods

showsPrec :: Int -> YA -> ShowS #

show :: YA -> String #

showList :: [YA] -> ShowS #

Elevator e => AlphaSpace YA e Source # 

Associated Types

type Opaque YA :: * Source #

Methods

getAlpha :: Pixel YA e -> e Source #

addAlpha :: e -> Pixel (Opaque YA) e -> Pixel YA e Source #

dropAlpha :: Pixel YA e -> Pixel (Opaque YA) e Source #

Elevator e => ColorSpace YA e Source # 

Associated Types

type Components YA e :: * Source #

Methods

toComponents :: Pixel YA e -> Components YA e Source #

fromComponents :: Components YA e -> Pixel YA e Source #

promote :: e -> Pixel YA e Source #

getPxC :: Pixel YA e -> YA -> e Source #

setPxC :: Pixel YA e -> YA -> e -> Pixel YA e Source #

mapPxC :: (YA -> e -> e) -> Pixel YA e -> Pixel YA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YA e -> Pixel YA e -> b Source #

liftPx :: (e -> e) -> Pixel YA e -> Pixel YA e Source #

liftPx2 :: (e -> e -> e) -> Pixel YA e -> Pixel YA e -> Pixel YA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YA e -> e Source #

Elevator e => ToYCbCrA YA e Source # 
Elevator e => ToYCbCr YA e Source # 
Elevator e => ToCMYKA YA e Source # 
Elevator e => ToCMYK YA e Source # 
Elevator e => ToHSIA YA e Source # 
Elevator e => ToHSI YA e Source # 
Elevator e => ToRGBA YA e Source # 
Elevator e => ToRGB YA e Source # 
Elevator e => ToYA YA e Source # 
Elevator e => ToY YA e Source # 
Functor (Pixel YA) Source # 

Methods

fmap :: (a -> b) -> Pixel YA a -> Pixel YA b #

(<$) :: a -> Pixel YA b -> Pixel YA a #

Applicative (Pixel YA) Source # 

Methods

pure :: a -> Pixel YA a #

(<*>) :: Pixel YA (a -> b) -> Pixel YA a -> Pixel YA b #

liftA2 :: (a -> b -> c) -> Pixel YA a -> Pixel YA b -> Pixel YA c #

(*>) :: Pixel YA a -> Pixel YA b -> Pixel YA b #

(<*) :: Pixel YA a -> Pixel YA b -> Pixel YA a #

Foldable (Pixel YA) Source # 

Methods

fold :: Monoid m => Pixel YA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YA a -> b #

foldr1 :: (a -> a -> a) -> Pixel YA a -> a #

foldl1 :: (a -> a -> a) -> Pixel YA a -> a #

toList :: Pixel YA a -> [a] #

null :: Pixel YA a -> Bool #

length :: Pixel YA a -> Int #

elem :: Eq a => a -> Pixel YA a -> Bool #

maximum :: Ord a => Pixel YA a -> a #

minimum :: Ord a => Pixel YA a -> a #

sum :: Num a => Pixel YA a -> a #

product :: Num a => Pixel YA a -> a #

Eq e => Eq (Pixel YA e) Source # 

Methods

(==) :: Pixel YA e -> Pixel YA e -> Bool #

(/=) :: Pixel YA e -> Pixel YA e -> Bool #

Ord e => Ord (Pixel YA e) Source # 

Methods

compare :: Pixel YA e -> Pixel YA e -> Ordering #

(<) :: Pixel YA e -> Pixel YA e -> Bool #

(<=) :: Pixel YA e -> Pixel YA e -> Bool #

(>) :: Pixel YA e -> Pixel YA e -> Bool #

(>=) :: Pixel YA e -> Pixel YA e -> Bool #

max :: Pixel YA e -> Pixel YA e -> Pixel YA e #

min :: Pixel YA e -> Pixel YA e -> Pixel YA e #

Show e => Show (Pixel YA e) Source # 

Methods

showsPrec :: Int -> Pixel YA e -> ShowS #

show :: Pixel YA e -> String #

showList :: [Pixel YA e] -> ShowS #

Storable e => Storable (Pixel YA e) Source # 

Methods

sizeOf :: Pixel YA e -> Int #

alignment :: Pixel YA e -> Int #

peekElemOff :: Ptr (Pixel YA e) -> Int -> IO (Pixel YA e) #

pokeElemOff :: Ptr (Pixel YA e) -> Int -> Pixel YA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel YA e) #

pokeByteOff :: Ptr b -> Int -> Pixel YA e -> IO () #

peek :: Ptr (Pixel YA e) -> IO (Pixel YA e) #

poke :: Ptr (Pixel YA e) -> Pixel YA e -> IO () #

type Opaque YA Source # 
type Opaque YA = Y
data Pixel YA Source # 
data Pixel YA = PixelYA !e !e
type Components YA e Source # 
type Components YA e = (e, e)

class ColorSpace cs e => ToY cs e where Source #

Conversion to Luma color space.

Minimal complete definition

toPixelY

Methods

toPixelY :: Pixel cs e -> Pixel Y Double Source #

Convert a pixel to Luma pixel.

Instances

Elevator e => ToY HSIA e Source # 
Elevator e => ToY HSI e Source # 
Elevator e => ToY CMYKA e Source # 
Elevator e => ToY CMYK e Source # 
Elevator e => ToY RGBA e Source # 
Elevator e => ToY RGB e Source #

Computes Luma: Y' = 0.299 * R' + 0.587 * G' + 0.114 * B'

Elevator e => ToY X e Source # 

Methods

toPixelY :: Pixel X e -> Pixel Y Double Source #

Elevator e => ToY YA e Source # 
Elevator e => ToY Y e Source # 

Methods

toPixelY :: Pixel Y e -> Pixel Y Double Source #

Elevator e => ToY YCbCrA e Source # 
Elevator e => ToY YCbCr e Source # 

class ToY cs e => ToYA cs e where Source #

Conversion to Luma from another color space.

Methods

toPixelYA :: Pixel cs e -> Pixel YA Double Source #

Convert a pixel to Luma pixel with Alpha.

RGB

data RGB Source #

Red, Green and Blue color space.

Constructors

RedRGB 
GreenRGB 
BlueRGB 

Instances

Bounded RGB Source # 

Methods

minBound :: RGB #

maxBound :: RGB #

Enum RGB Source # 

Methods

succ :: RGB -> RGB #

pred :: RGB -> RGB #

toEnum :: Int -> RGB #

fromEnum :: RGB -> Int #

enumFrom :: RGB -> [RGB] #

enumFromThen :: RGB -> RGB -> [RGB] #

enumFromTo :: RGB -> RGB -> [RGB] #

enumFromThenTo :: RGB -> RGB -> RGB -> [RGB] #

Eq RGB Source # 

Methods

(==) :: RGB -> RGB -> Bool #

(/=) :: RGB -> RGB -> Bool #

Show RGB Source # 

Methods

showsPrec :: Int -> RGB -> ShowS #

show :: RGB -> String #

showList :: [RGB] -> ShowS #

Elevator e => ColorSpace RGB e Source # 

Associated Types

type Components RGB e :: * Source #

Methods

toComponents :: Pixel RGB e -> Components RGB e Source #

fromComponents :: Components RGB e -> Pixel RGB e Source #

promote :: e -> Pixel RGB e Source #

getPxC :: Pixel RGB e -> RGB -> e Source #

setPxC :: Pixel RGB e -> RGB -> e -> Pixel RGB e Source #

mapPxC :: (RGB -> e -> e) -> Pixel RGB e -> Pixel RGB e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel RGB e -> Pixel RGB e -> b Source #

liftPx :: (e -> e) -> Pixel RGB e -> Pixel RGB e Source #

liftPx2 :: (e -> e -> e) -> Pixel RGB e -> Pixel RGB e -> Pixel RGB e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel RGB e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel RGB e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel RGB e -> e Source #

ToYCbCr RGB e => ToYCbCrA RGB e Source # 
Elevator e => ToYCbCr RGB e Source # 
ToCMYK RGB e => ToCMYKA RGB e Source # 
Elevator e => ToCMYK RGB e Source # 
ToHSI RGB e => ToHSIA RGB e Source # 
Elevator e => ToHSI RGB e Source # 
ToRGB RGB e => ToRGBA RGB e Source # 
Elevator e => ToRGB RGB e Source # 
ToY RGB e => ToYA RGB e Source # 
Elevator e => ToY RGB e Source #

Computes Luma: Y' = 0.299 * R' + 0.587 * G' + 0.114 * B'

Functor (Pixel RGB) Source # 

Methods

fmap :: (a -> b) -> Pixel RGB a -> Pixel RGB b #

(<$) :: a -> Pixel RGB b -> Pixel RGB a #

Applicative (Pixel RGB) Source # 

Methods

pure :: a -> Pixel RGB a #

(<*>) :: Pixel RGB (a -> b) -> Pixel RGB a -> Pixel RGB b #

liftA2 :: (a -> b -> c) -> Pixel RGB a -> Pixel RGB b -> Pixel RGB c #

(*>) :: Pixel RGB a -> Pixel RGB b -> Pixel RGB b #

(<*) :: Pixel RGB a -> Pixel RGB b -> Pixel RGB a #

Foldable (Pixel RGB) Source # 

Methods

fold :: Monoid m => Pixel RGB m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel RGB a -> m #

foldr :: (a -> b -> b) -> b -> Pixel RGB a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel RGB a -> b #

foldl :: (b -> a -> b) -> b -> Pixel RGB a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel RGB a -> b #

foldr1 :: (a -> a -> a) -> Pixel RGB a -> a #

foldl1 :: (a -> a -> a) -> Pixel RGB a -> a #

toList :: Pixel RGB a -> [a] #

null :: Pixel RGB a -> Bool #

length :: Pixel RGB a -> Int #

elem :: Eq a => a -> Pixel RGB a -> Bool #

maximum :: Ord a => Pixel RGB a -> a #

minimum :: Ord a => Pixel RGB a -> a #

sum :: Num a => Pixel RGB a -> a #

product :: Num a => Pixel RGB a -> a #

Eq e => Eq (Pixel RGB e) Source # 

Methods

(==) :: Pixel RGB e -> Pixel RGB e -> Bool #

(/=) :: Pixel RGB e -> Pixel RGB e -> Bool #

Ord e => Ord (Pixel RGB e) Source # 

Methods

compare :: Pixel RGB e -> Pixel RGB e -> Ordering #

(<) :: Pixel RGB e -> Pixel RGB e -> Bool #

(<=) :: Pixel RGB e -> Pixel RGB e -> Bool #

(>) :: Pixel RGB e -> Pixel RGB e -> Bool #

(>=) :: Pixel RGB e -> Pixel RGB e -> Bool #

max :: Pixel RGB e -> Pixel RGB e -> Pixel RGB e #

min :: Pixel RGB e -> Pixel RGB e -> Pixel RGB e #

Show e => Show (Pixel RGB e) Source # 

Methods

showsPrec :: Int -> Pixel RGB e -> ShowS #

show :: Pixel RGB e -> String #

showList :: [Pixel RGB e] -> ShowS #

Storable e => Storable (Pixel RGB e) Source # 

Methods

sizeOf :: Pixel RGB e -> Int #

alignment :: Pixel RGB e -> Int #

peekElemOff :: Ptr (Pixel RGB e) -> Int -> IO (Pixel RGB e) #

pokeElemOff :: Ptr (Pixel RGB e) -> Int -> Pixel RGB e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel RGB e) #

pokeByteOff :: Ptr b -> Int -> Pixel RGB e -> IO () #

peek :: Ptr (Pixel RGB e) -> IO (Pixel RGB e) #

poke :: Ptr (Pixel RGB e) -> Pixel RGB e -> IO () #

data Pixel RGB Source # 
data Pixel RGB = PixelRGB !e !e !e
type Components RGB e Source # 
type Components RGB e = (e, e, e)

data RGBA Source #

Red, Green and Blue color space with Alpha channel.

Instances

Bounded RGBA Source # 
Enum RGBA Source # 

Methods

succ :: RGBA -> RGBA #

pred :: RGBA -> RGBA #

toEnum :: Int -> RGBA #

fromEnum :: RGBA -> Int #

enumFrom :: RGBA -> [RGBA] #

enumFromThen :: RGBA -> RGBA -> [RGBA] #

enumFromTo :: RGBA -> RGBA -> [RGBA] #

enumFromThenTo :: RGBA -> RGBA -> RGBA -> [RGBA] #

Eq RGBA Source # 

Methods

(==) :: RGBA -> RGBA -> Bool #

(/=) :: RGBA -> RGBA -> Bool #

Show RGBA Source # 

Methods

showsPrec :: Int -> RGBA -> ShowS #

show :: RGBA -> String #

showList :: [RGBA] -> ShowS #

Elevator e => AlphaSpace RGBA e Source # 

Associated Types

type Opaque RGBA :: * Source #

Elevator e => ColorSpace RGBA e Source # 

Associated Types

type Components RGBA e :: * Source #

Methods

toComponents :: Pixel RGBA e -> Components RGBA e Source #

fromComponents :: Components RGBA e -> Pixel RGBA e Source #

promote :: e -> Pixel RGBA e Source #

getPxC :: Pixel RGBA e -> RGBA -> e Source #

setPxC :: Pixel RGBA e -> RGBA -> e -> Pixel RGBA e Source #

mapPxC :: (RGBA -> e -> e) -> Pixel RGBA e -> Pixel RGBA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel RGBA e -> Pixel RGBA e -> b Source #

liftPx :: (e -> e) -> Pixel RGBA e -> Pixel RGBA e Source #

liftPx2 :: (e -> e -> e) -> Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel RGBA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel RGBA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel RGBA e -> e Source #

Elevator e => ToYCbCrA RGBA e Source # 
Elevator e => ToYCbCr RGBA e Source # 
Elevator e => ToCMYKA RGBA e Source # 
Elevator e => ToCMYK RGBA e Source # 
Elevator e => ToHSIA RGBA e Source # 
Elevator e => ToHSI RGBA e Source # 
Elevator e => ToRGBA RGBA e Source # 
Elevator e => ToRGB RGBA e Source # 
Elevator e => ToYA RGBA e Source # 
Elevator e => ToY RGBA e Source # 
Functor (Pixel RGBA) Source # 

Methods

fmap :: (a -> b) -> Pixel RGBA a -> Pixel RGBA b #

(<$) :: a -> Pixel RGBA b -> Pixel RGBA a #

Applicative (Pixel RGBA) Source # 

Methods

pure :: a -> Pixel RGBA a #

(<*>) :: Pixel RGBA (a -> b) -> Pixel RGBA a -> Pixel RGBA b #

liftA2 :: (a -> b -> c) -> Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA c #

(*>) :: Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA b #

(<*) :: Pixel RGBA a -> Pixel RGBA b -> Pixel RGBA a #

Foldable (Pixel RGBA) Source # 

Methods

fold :: Monoid m => Pixel RGBA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel RGBA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel RGBA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel RGBA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel RGBA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel RGBA a -> b #

foldr1 :: (a -> a -> a) -> Pixel RGBA a -> a #

foldl1 :: (a -> a -> a) -> Pixel RGBA a -> a #

toList :: Pixel RGBA a -> [a] #

null :: Pixel RGBA a -> Bool #

length :: Pixel RGBA a -> Int #

elem :: Eq a => a -> Pixel RGBA a -> Bool #

maximum :: Ord a => Pixel RGBA a -> a #

minimum :: Ord a => Pixel RGBA a -> a #

sum :: Num a => Pixel RGBA a -> a #

product :: Num a => Pixel RGBA a -> a #

Eq e => Eq (Pixel RGBA e) Source # 

Methods

(==) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(/=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

Ord e => Ord (Pixel RGBA e) Source # 

Methods

compare :: Pixel RGBA e -> Pixel RGBA e -> Ordering #

(<) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(<=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(>) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

(>=) :: Pixel RGBA e -> Pixel RGBA e -> Bool #

max :: Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e #

min :: Pixel RGBA e -> Pixel RGBA e -> Pixel RGBA e #

Show e => Show (Pixel RGBA e) Source # 

Methods

showsPrec :: Int -> Pixel RGBA e -> ShowS #

show :: Pixel RGBA e -> String #

showList :: [Pixel RGBA e] -> ShowS #

Storable e => Storable (Pixel RGBA e) Source # 

Methods

sizeOf :: Pixel RGBA e -> Int #

alignment :: Pixel RGBA e -> Int #

peekElemOff :: Ptr (Pixel RGBA e) -> Int -> IO (Pixel RGBA e) #

pokeElemOff :: Ptr (Pixel RGBA e) -> Int -> Pixel RGBA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel RGBA e) #

pokeByteOff :: Ptr b -> Int -> Pixel RGBA e -> IO () #

peek :: Ptr (Pixel RGBA e) -> IO (Pixel RGBA e) #

poke :: Ptr (Pixel RGBA e) -> Pixel RGBA e -> IO () #

type Opaque RGBA Source # 
type Opaque RGBA = RGB
data Pixel RGBA Source # 
data Pixel RGBA = PixelRGBA !e !e !e !e
type Components RGBA e Source # 
type Components RGBA e = (e, e, e, e)

class ColorSpace cs e => ToRGB cs e where Source #

Conversion to RGB color space.

Minimal complete definition

toPixelRGB

Methods

toPixelRGB :: Pixel cs e -> Pixel RGB Double Source #

Convert to an RGB pixel.

class ToRGB cs e => ToRGBA cs e where Source #

Conversion to RGBA from another color space with Alpha channel.

Methods

toPixelRGBA :: Pixel cs e -> Pixel RGBA Double Source #

Convert to an RGBA pixel.

HSI

data HSI Source #

Hue, Saturation and Intensity color space.

Constructors

HueHSI

Hue

SatHSI

Saturation

IntHSI

Intensity

Instances

Bounded HSI Source # 

Methods

minBound :: HSI #

maxBound :: HSI #

Enum HSI Source # 

Methods

succ :: HSI -> HSI #

pred :: HSI -> HSI #

toEnum :: Int -> HSI #

fromEnum :: HSI -> Int #

enumFrom :: HSI -> [HSI] #

enumFromThen :: HSI -> HSI -> [HSI] #

enumFromTo :: HSI -> HSI -> [HSI] #

enumFromThenTo :: HSI -> HSI -> HSI -> [HSI] #

Eq HSI Source # 

Methods

(==) :: HSI -> HSI -> Bool #

(/=) :: HSI -> HSI -> Bool #

Show HSI Source # 

Methods

showsPrec :: Int -> HSI -> ShowS #

show :: HSI -> String #

showList :: [HSI] -> ShowS #

Elevator e => ColorSpace HSI e Source # 

Associated Types

type Components HSI e :: * Source #

Methods

toComponents :: Pixel HSI e -> Components HSI e Source #

fromComponents :: Components HSI e -> Pixel HSI e Source #

promote :: e -> Pixel HSI e Source #

getPxC :: Pixel HSI e -> HSI -> e Source #

setPxC :: Pixel HSI e -> HSI -> e -> Pixel HSI e Source #

mapPxC :: (HSI -> e -> e) -> Pixel HSI e -> Pixel HSI e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel HSI e -> Pixel HSI e -> b Source #

liftPx :: (e -> e) -> Pixel HSI e -> Pixel HSI e Source #

liftPx2 :: (e -> e -> e) -> Pixel HSI e -> Pixel HSI e -> Pixel HSI e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel HSI e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel HSI e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel HSI e -> e Source #

ToYCbCr HSI e => ToYCbCrA HSI e Source # 
Elevator e => ToYCbCr HSI e Source # 
ToCMYK HSI e => ToCMYKA HSI e Source # 
Elevator e => ToCMYK HSI e Source # 
ToHSI HSI e => ToHSIA HSI e Source # 
Elevator e => ToHSI HSI e Source # 
ToRGB HSI e => ToRGBA HSI e Source # 
Elevator e => ToRGB HSI e Source # 
ToY HSI e => ToYA HSI e Source # 
Elevator e => ToY HSI e Source # 
Functor (Pixel HSI) Source # 

Methods

fmap :: (a -> b) -> Pixel HSI a -> Pixel HSI b #

(<$) :: a -> Pixel HSI b -> Pixel HSI a #

Applicative (Pixel HSI) Source # 

Methods

pure :: a -> Pixel HSI a #

(<*>) :: Pixel HSI (a -> b) -> Pixel HSI a -> Pixel HSI b #

liftA2 :: (a -> b -> c) -> Pixel HSI a -> Pixel HSI b -> Pixel HSI c #

(*>) :: Pixel HSI a -> Pixel HSI b -> Pixel HSI b #

(<*) :: Pixel HSI a -> Pixel HSI b -> Pixel HSI a #

Foldable (Pixel HSI) Source # 

Methods

fold :: Monoid m => Pixel HSI m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel HSI a -> m #

foldr :: (a -> b -> b) -> b -> Pixel HSI a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel HSI a -> b #

foldl :: (b -> a -> b) -> b -> Pixel HSI a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel HSI a -> b #

foldr1 :: (a -> a -> a) -> Pixel HSI a -> a #

foldl1 :: (a -> a -> a) -> Pixel HSI a -> a #

toList :: Pixel HSI a -> [a] #

null :: Pixel HSI a -> Bool #

length :: Pixel HSI a -> Int #

elem :: Eq a => a -> Pixel HSI a -> Bool #

maximum :: Ord a => Pixel HSI a -> a #

minimum :: Ord a => Pixel HSI a -> a #

sum :: Num a => Pixel HSI a -> a #

product :: Num a => Pixel HSI a -> a #

Eq e => Eq (Pixel HSI e) Source # 

Methods

(==) :: Pixel HSI e -> Pixel HSI e -> Bool #

(/=) :: Pixel HSI e -> Pixel HSI e -> Bool #

Ord e => Ord (Pixel HSI e) Source # 

Methods

compare :: Pixel HSI e -> Pixel HSI e -> Ordering #

(<) :: Pixel HSI e -> Pixel HSI e -> Bool #

(<=) :: Pixel HSI e -> Pixel HSI e -> Bool #

(>) :: Pixel HSI e -> Pixel HSI e -> Bool #

(>=) :: Pixel HSI e -> Pixel HSI e -> Bool #

max :: Pixel HSI e -> Pixel HSI e -> Pixel HSI e #

min :: Pixel HSI e -> Pixel HSI e -> Pixel HSI e #

Show e => Show (Pixel HSI e) Source # 

Methods

showsPrec :: Int -> Pixel HSI e -> ShowS #

show :: Pixel HSI e -> String #

showList :: [Pixel HSI e] -> ShowS #

Storable e => Storable (Pixel HSI e) Source # 

Methods

sizeOf :: Pixel HSI e -> Int #

alignment :: Pixel HSI e -> Int #

peekElemOff :: Ptr (Pixel HSI e) -> Int -> IO (Pixel HSI e) #

pokeElemOff :: Ptr (Pixel HSI e) -> Int -> Pixel HSI e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel HSI e) #

pokeByteOff :: Ptr b -> Int -> Pixel HSI e -> IO () #

peek :: Ptr (Pixel HSI e) -> IO (Pixel HSI e) #

poke :: Ptr (Pixel HSI e) -> Pixel HSI e -> IO () #

data Pixel HSI Source # 
data Pixel HSI = PixelHSI !e !e !e
type Components HSI e Source # 
type Components HSI e = (e, e, e)

data HSIA Source #

Hue, Saturation and Intensity color space with Alpha channel.

Constructors

HueHSIA

Hue

SatHSIA

Saturation

IntHSIA

Intensity

AlphaHSIA

Alpha

Instances

Bounded HSIA Source # 
Enum HSIA Source # 

Methods

succ :: HSIA -> HSIA #

pred :: HSIA -> HSIA #

toEnum :: Int -> HSIA #

fromEnum :: HSIA -> Int #

enumFrom :: HSIA -> [HSIA] #

enumFromThen :: HSIA -> HSIA -> [HSIA] #

enumFromTo :: HSIA -> HSIA -> [HSIA] #

enumFromThenTo :: HSIA -> HSIA -> HSIA -> [HSIA] #

Eq HSIA Source # 

Methods

(==) :: HSIA -> HSIA -> Bool #

(/=) :: HSIA -> HSIA -> Bool #

Show HSIA Source # 

Methods

showsPrec :: Int -> HSIA -> ShowS #

show :: HSIA -> String #

showList :: [HSIA] -> ShowS #

Elevator e => AlphaSpace HSIA e Source # 

Associated Types

type Opaque HSIA :: * Source #

Elevator e => ColorSpace HSIA e Source # 

Associated Types

type Components HSIA e :: * Source #

Methods

toComponents :: Pixel HSIA e -> Components HSIA e Source #

fromComponents :: Components HSIA e -> Pixel HSIA e Source #

promote :: e -> Pixel HSIA e Source #

getPxC :: Pixel HSIA e -> HSIA -> e Source #

setPxC :: Pixel HSIA e -> HSIA -> e -> Pixel HSIA e Source #

mapPxC :: (HSIA -> e -> e) -> Pixel HSIA e -> Pixel HSIA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel HSIA e -> Pixel HSIA e -> b Source #

liftPx :: (e -> e) -> Pixel HSIA e -> Pixel HSIA e Source #

liftPx2 :: (e -> e -> e) -> Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel HSIA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel HSIA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel HSIA e -> e Source #

Elevator e => ToYCbCrA HSIA e Source # 
Elevator e => ToYCbCr HSIA e Source # 
Elevator e => ToCMYKA HSIA e Source # 
Elevator e => ToCMYK HSIA e Source # 
Elevator e => ToHSIA HSIA e Source # 
Elevator e => ToHSI HSIA e Source # 
Elevator e => ToRGBA HSIA e Source # 
Elevator e => ToRGB HSIA e Source # 
Elevator e => ToYA HSIA e Source # 
Elevator e => ToY HSIA e Source # 
Functor (Pixel HSIA) Source # 

Methods

fmap :: (a -> b) -> Pixel HSIA a -> Pixel HSIA b #

(<$) :: a -> Pixel HSIA b -> Pixel HSIA a #

Applicative (Pixel HSIA) Source # 

Methods

pure :: a -> Pixel HSIA a #

(<*>) :: Pixel HSIA (a -> b) -> Pixel HSIA a -> Pixel HSIA b #

liftA2 :: (a -> b -> c) -> Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA c #

(*>) :: Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA b #

(<*) :: Pixel HSIA a -> Pixel HSIA b -> Pixel HSIA a #

Foldable (Pixel HSIA) Source # 

Methods

fold :: Monoid m => Pixel HSIA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel HSIA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel HSIA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel HSIA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel HSIA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel HSIA a -> b #

foldr1 :: (a -> a -> a) -> Pixel HSIA a -> a #

foldl1 :: (a -> a -> a) -> Pixel HSIA a -> a #

toList :: Pixel HSIA a -> [a] #

null :: Pixel HSIA a -> Bool #

length :: Pixel HSIA a -> Int #

elem :: Eq a => a -> Pixel HSIA a -> Bool #

maximum :: Ord a => Pixel HSIA a -> a #

minimum :: Ord a => Pixel HSIA a -> a #

sum :: Num a => Pixel HSIA a -> a #

product :: Num a => Pixel HSIA a -> a #

Eq e => Eq (Pixel HSIA e) Source # 

Methods

(==) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(/=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

Ord e => Ord (Pixel HSIA e) Source # 

Methods

compare :: Pixel HSIA e -> Pixel HSIA e -> Ordering #

(<) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(<=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(>) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

(>=) :: Pixel HSIA e -> Pixel HSIA e -> Bool #

max :: Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e #

min :: Pixel HSIA e -> Pixel HSIA e -> Pixel HSIA e #

Show e => Show (Pixel HSIA e) Source # 

Methods

showsPrec :: Int -> Pixel HSIA e -> ShowS #

show :: Pixel HSIA e -> String #

showList :: [Pixel HSIA e] -> ShowS #

Storable e => Storable (Pixel HSIA e) Source # 

Methods

sizeOf :: Pixel HSIA e -> Int #

alignment :: Pixel HSIA e -> Int #

peekElemOff :: Ptr (Pixel HSIA e) -> Int -> IO (Pixel HSIA e) #

pokeElemOff :: Ptr (Pixel HSIA e) -> Int -> Pixel HSIA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel HSIA e) #

pokeByteOff :: Ptr b -> Int -> Pixel HSIA e -> IO () #

peek :: Ptr (Pixel HSIA e) -> IO (Pixel HSIA e) #

poke :: Ptr (Pixel HSIA e) -> Pixel HSIA e -> IO () #

type Opaque HSIA Source # 
type Opaque HSIA = HSI
data Pixel HSIA Source # 
data Pixel HSIA = PixelHSIA !e !e !e !e
type Components HSIA e Source # 
type Components HSIA e = (e, e, e, e)

class ColorSpace cs e => ToHSI cs e where Source #

Conversion to HSI color space.

Minimal complete definition

toPixelHSI

Methods

toPixelHSI :: Pixel cs e -> Pixel HSI Double Source #

Convert to an HSI pixel.

class ToHSI cs e => ToHSIA cs e where Source #

Conversion to HSIA from another color space with Alpha channel.

Methods

toPixelHSIA :: Pixel cs e -> Pixel HSIA Double Source #

Convert to an HSIA pixel.

CMYK

data CMYK Source #

Cyan, Magenta, Yellow and Black color space.

Constructors

CyanCMYK

Cyan

MagCMYK

Magenta

YelCMYK

Yellow

KeyCMYK

Key (Black)

Instances

Bounded CMYK Source # 
Enum CMYK Source # 

Methods

succ :: CMYK -> CMYK #

pred :: CMYK -> CMYK #

toEnum :: Int -> CMYK #

fromEnum :: CMYK -> Int #

enumFrom :: CMYK -> [CMYK] #

enumFromThen :: CMYK -> CMYK -> [CMYK] #

enumFromTo :: CMYK -> CMYK -> [CMYK] #

enumFromThenTo :: CMYK -> CMYK -> CMYK -> [CMYK] #

Eq CMYK Source # 

Methods

(==) :: CMYK -> CMYK -> Bool #

(/=) :: CMYK -> CMYK -> Bool #

Show CMYK Source # 

Methods

showsPrec :: Int -> CMYK -> ShowS #

show :: CMYK -> String #

showList :: [CMYK] -> ShowS #

Elevator e => ColorSpace CMYK e Source # 

Associated Types

type Components CMYK e :: * Source #

Methods

toComponents :: Pixel CMYK e -> Components CMYK e Source #

fromComponents :: Components CMYK e -> Pixel CMYK e Source #

promote :: e -> Pixel CMYK e Source #

getPxC :: Pixel CMYK e -> CMYK -> e Source #

setPxC :: Pixel CMYK e -> CMYK -> e -> Pixel CMYK e Source #

mapPxC :: (CMYK -> e -> e) -> Pixel CMYK e -> Pixel CMYK e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel CMYK e -> Pixel CMYK e -> b Source #

liftPx :: (e -> e) -> Pixel CMYK e -> Pixel CMYK e Source #

liftPx2 :: (e -> e -> e) -> Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel CMYK e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel CMYK e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel CMYK e -> e Source #

ToYCbCr CMYK e => ToYCbCrA CMYK e Source # 
Elevator e => ToYCbCr CMYK e Source # 
ToCMYK CMYK e => ToCMYKA CMYK e Source # 
Elevator e => ToCMYK CMYK e Source # 
ToHSI CMYK e => ToHSIA CMYK e Source # 
Elevator e => ToHSI CMYK e Source # 
ToRGB CMYK e => ToRGBA CMYK e Source # 
Elevator e => ToRGB CMYK e Source # 
ToY CMYK e => ToYA CMYK e Source # 
Elevator e => ToY CMYK e Source # 
Functor (Pixel CMYK) Source # 

Methods

fmap :: (a -> b) -> Pixel CMYK a -> Pixel CMYK b #

(<$) :: a -> Pixel CMYK b -> Pixel CMYK a #

Applicative (Pixel CMYK) Source # 

Methods

pure :: a -> Pixel CMYK a #

(<*>) :: Pixel CMYK (a -> b) -> Pixel CMYK a -> Pixel CMYK b #

liftA2 :: (a -> b -> c) -> Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK c #

(*>) :: Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK b #

(<*) :: Pixel CMYK a -> Pixel CMYK b -> Pixel CMYK a #

Foldable (Pixel CMYK) Source # 

Methods

fold :: Monoid m => Pixel CMYK m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel CMYK a -> m #

foldr :: (a -> b -> b) -> b -> Pixel CMYK a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel CMYK a -> b #

foldl :: (b -> a -> b) -> b -> Pixel CMYK a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel CMYK a -> b #

foldr1 :: (a -> a -> a) -> Pixel CMYK a -> a #

foldl1 :: (a -> a -> a) -> Pixel CMYK a -> a #

toList :: Pixel CMYK a -> [a] #

null :: Pixel CMYK a -> Bool #

length :: Pixel CMYK a -> Int #

elem :: Eq a => a -> Pixel CMYK a -> Bool #

maximum :: Ord a => Pixel CMYK a -> a #

minimum :: Ord a => Pixel CMYK a -> a #

sum :: Num a => Pixel CMYK a -> a #

product :: Num a => Pixel CMYK a -> a #

Eq e => Eq (Pixel CMYK e) Source # 

Methods

(==) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(/=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

Ord e => Ord (Pixel CMYK e) Source # 

Methods

compare :: Pixel CMYK e -> Pixel CMYK e -> Ordering #

(<) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(<=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(>) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

(>=) :: Pixel CMYK e -> Pixel CMYK e -> Bool #

max :: Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e #

min :: Pixel CMYK e -> Pixel CMYK e -> Pixel CMYK e #

Show e => Show (Pixel CMYK e) Source # 

Methods

showsPrec :: Int -> Pixel CMYK e -> ShowS #

show :: Pixel CMYK e -> String #

showList :: [Pixel CMYK e] -> ShowS #

Storable e => Storable (Pixel CMYK e) Source # 

Methods

sizeOf :: Pixel CMYK e -> Int #

alignment :: Pixel CMYK e -> Int #

peekElemOff :: Ptr (Pixel CMYK e) -> Int -> IO (Pixel CMYK e) #

pokeElemOff :: Ptr (Pixel CMYK e) -> Int -> Pixel CMYK e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel CMYK e) #

pokeByteOff :: Ptr b -> Int -> Pixel CMYK e -> IO () #

peek :: Ptr (Pixel CMYK e) -> IO (Pixel CMYK e) #

poke :: Ptr (Pixel CMYK e) -> Pixel CMYK e -> IO () #

data Pixel CMYK Source # 
data Pixel CMYK = PixelCMYK !e !e !e !e
type Components CMYK e Source # 
type Components CMYK e = (e, e, e, e)

data CMYKA Source #

Cyan, Magenta, Yellow and Black color space with Alpha channel.

Constructors

CyanCMYKA

Cyan

MagCMYKA

Magenta

YelCMYKA

Yellow

KeyCMYKA

Key (Black)

AlphaCMYKA

Alpha

Instances

Bounded CMYKA Source # 
Enum CMYKA Source # 
Eq CMYKA Source # 

Methods

(==) :: CMYKA -> CMYKA -> Bool #

(/=) :: CMYKA -> CMYKA -> Bool #

Show CMYKA Source # 

Methods

showsPrec :: Int -> CMYKA -> ShowS #

show :: CMYKA -> String #

showList :: [CMYKA] -> ShowS #

Elevator e => AlphaSpace CMYKA e Source # 

Associated Types

type Opaque CMYKA :: * Source #

Elevator e => ColorSpace CMYKA e Source # 

Associated Types

type Components CMYKA e :: * Source #

Methods

toComponents :: Pixel CMYKA e -> Components CMYKA e Source #

fromComponents :: Components CMYKA e -> Pixel CMYKA e Source #

promote :: e -> Pixel CMYKA e Source #

getPxC :: Pixel CMYKA e -> CMYKA -> e Source #

setPxC :: Pixel CMYKA e -> CMYKA -> e -> Pixel CMYKA e Source #

mapPxC :: (CMYKA -> e -> e) -> Pixel CMYKA e -> Pixel CMYKA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel CMYKA e -> Pixel CMYKA e -> b Source #

liftPx :: (e -> e) -> Pixel CMYKA e -> Pixel CMYKA e Source #

liftPx2 :: (e -> e -> e) -> Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel CMYKA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel CMYKA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel CMYKA e -> e Source #

Elevator e => ToYCbCrA CMYKA e Source # 
Elevator e => ToYCbCr CMYKA e Source # 
Elevator e => ToCMYKA CMYKA e Source # 
Elevator e => ToCMYK CMYKA e Source # 
Elevator e => ToHSIA CMYKA e Source # 
Elevator e => ToHSI CMYKA e Source # 
Elevator e => ToRGBA CMYKA e Source # 
Elevator e => ToRGB CMYKA e Source # 
Elevator e => ToYA CMYKA e Source # 
Elevator e => ToY CMYKA e Source # 
Functor (Pixel CMYKA) Source # 

Methods

fmap :: (a -> b) -> Pixel CMYKA a -> Pixel CMYKA b #

(<$) :: a -> Pixel CMYKA b -> Pixel CMYKA a #

Applicative (Pixel CMYKA) Source # 

Methods

pure :: a -> Pixel CMYKA a #

(<*>) :: Pixel CMYKA (a -> b) -> Pixel CMYKA a -> Pixel CMYKA b #

liftA2 :: (a -> b -> c) -> Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA c #

(*>) :: Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA b #

(<*) :: Pixel CMYKA a -> Pixel CMYKA b -> Pixel CMYKA a #

Foldable (Pixel CMYKA) Source # 

Methods

fold :: Monoid m => Pixel CMYKA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel CMYKA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel CMYKA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel CMYKA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel CMYKA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel CMYKA a -> b #

foldr1 :: (a -> a -> a) -> Pixel CMYKA a -> a #

foldl1 :: (a -> a -> a) -> Pixel CMYKA a -> a #

toList :: Pixel CMYKA a -> [a] #

null :: Pixel CMYKA a -> Bool #

length :: Pixel CMYKA a -> Int #

elem :: Eq a => a -> Pixel CMYKA a -> Bool #

maximum :: Ord a => Pixel CMYKA a -> a #

minimum :: Ord a => Pixel CMYKA a -> a #

sum :: Num a => Pixel CMYKA a -> a #

product :: Num a => Pixel CMYKA a -> a #

Eq e => Eq (Pixel CMYKA e) Source # 

Methods

(==) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(/=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

Ord e => Ord (Pixel CMYKA e) Source # 

Methods

compare :: Pixel CMYKA e -> Pixel CMYKA e -> Ordering #

(<) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(<=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(>) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

(>=) :: Pixel CMYKA e -> Pixel CMYKA e -> Bool #

max :: Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e #

min :: Pixel CMYKA e -> Pixel CMYKA e -> Pixel CMYKA e #

Show e => Show (Pixel CMYKA e) Source # 

Methods

showsPrec :: Int -> Pixel CMYKA e -> ShowS #

show :: Pixel CMYKA e -> String #

showList :: [Pixel CMYKA e] -> ShowS #

Storable e => Storable (Pixel CMYKA e) Source # 

Methods

sizeOf :: Pixel CMYKA e -> Int #

alignment :: Pixel CMYKA e -> Int #

peekElemOff :: Ptr (Pixel CMYKA e) -> Int -> IO (Pixel CMYKA e) #

pokeElemOff :: Ptr (Pixel CMYKA e) -> Int -> Pixel CMYKA e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel CMYKA e) #

pokeByteOff :: Ptr b -> Int -> Pixel CMYKA e -> IO () #

peek :: Ptr (Pixel CMYKA e) -> IO (Pixel CMYKA e) #

poke :: Ptr (Pixel CMYKA e) -> Pixel CMYKA e -> IO () #

type Opaque CMYKA Source # 
data Pixel CMYKA Source # 
data Pixel CMYKA = PixelCMYKA !e !e !e !e !e
type Components CMYKA e Source # 
type Components CMYKA e = (e, e, e, e, e)

YCbCr

data YCbCr Source #

Color space is used to encode RGB information and is used in JPEG compression.

Constructors

LumaYCbCr

Luma component (commonly denoted as Y')

CBlueYCbCr

Blue difference chroma component

CRedYCbCr

Red difference chroma component

Instances

Bounded YCbCr Source # 
Enum YCbCr Source # 
Eq YCbCr Source # 

Methods

(==) :: YCbCr -> YCbCr -> Bool #

(/=) :: YCbCr -> YCbCr -> Bool #

Show YCbCr Source # 

Methods

showsPrec :: Int -> YCbCr -> ShowS #

show :: YCbCr -> String #

showList :: [YCbCr] -> ShowS #

Elevator e => ColorSpace YCbCr e Source # 

Associated Types

type Components YCbCr e :: * Source #

Methods

toComponents :: Pixel YCbCr e -> Components YCbCr e Source #

fromComponents :: Components YCbCr e -> Pixel YCbCr e Source #

promote :: e -> Pixel YCbCr e Source #

getPxC :: Pixel YCbCr e -> YCbCr -> e Source #

setPxC :: Pixel YCbCr e -> YCbCr -> e -> Pixel YCbCr e Source #

mapPxC :: (YCbCr -> e -> e) -> Pixel YCbCr e -> Pixel YCbCr e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YCbCr e -> Pixel YCbCr e -> b Source #

liftPx :: (e -> e) -> Pixel YCbCr e -> Pixel YCbCr e Source #

liftPx2 :: (e -> e -> e) -> Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YCbCr e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YCbCr e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YCbCr e -> e Source #

ToYCbCr YCbCr e => ToYCbCrA YCbCr e Source # 
Elevator e => ToYCbCr YCbCr e Source # 
ToCMYK YCbCr e => ToCMYKA YCbCr e Source # 
Elevator e => ToCMYK YCbCr e Source # 
ToHSI YCbCr e => ToHSIA YCbCr e Source # 
Elevator e => ToHSI YCbCr e Source # 
ToRGB YCbCr e => ToRGBA YCbCr e Source # 
Elevator e => ToRGB YCbCr e Source # 
ToY YCbCr e => ToYA YCbCr e Source # 
Elevator e => ToY YCbCr e Source # 
Functor (Pixel YCbCr) Source # 

Methods

fmap :: (a -> b) -> Pixel YCbCr a -> Pixel YCbCr b #

(<$) :: a -> Pixel YCbCr b -> Pixel YCbCr a #

Applicative (Pixel YCbCr) Source # 

Methods

pure :: a -> Pixel YCbCr a #

(<*>) :: Pixel YCbCr (a -> b) -> Pixel YCbCr a -> Pixel YCbCr b #

liftA2 :: (a -> b -> c) -> Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr c #

(*>) :: Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr b #

(<*) :: Pixel YCbCr a -> Pixel YCbCr b -> Pixel YCbCr a #

Foldable (Pixel YCbCr) Source # 

Methods

fold :: Monoid m => Pixel YCbCr m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YCbCr a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YCbCr a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YCbCr a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YCbCr a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YCbCr a -> b #

foldr1 :: (a -> a -> a) -> Pixel YCbCr a -> a #

foldl1 :: (a -> a -> a) -> Pixel YCbCr a -> a #

toList :: Pixel YCbCr a -> [a] #

null :: Pixel YCbCr a -> Bool #

length :: Pixel YCbCr a -> Int #

elem :: Eq a => a -> Pixel YCbCr a -> Bool #

maximum :: Ord a => Pixel YCbCr a -> a #

minimum :: Ord a => Pixel YCbCr a -> a #

sum :: Num a => Pixel YCbCr a -> a #

product :: Num a => Pixel YCbCr a -> a #

Eq e => Eq (Pixel YCbCr e) Source # 

Methods

(==) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(/=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

Ord e => Ord (Pixel YCbCr e) Source # 

Methods

compare :: Pixel YCbCr e -> Pixel YCbCr e -> Ordering #

(<) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(<=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(>) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

(>=) :: Pixel YCbCr e -> Pixel YCbCr e -> Bool #

max :: Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e #

min :: Pixel YCbCr e -> Pixel YCbCr e -> Pixel YCbCr e #

Show e => Show (Pixel YCbCr e) Source # 

Methods

showsPrec :: Int -> Pixel YCbCr e -> ShowS #

show :: Pixel YCbCr e -> String #

showList :: [Pixel YCbCr e] -> ShowS #

Storable e => Storable (Pixel YCbCr e) Source # 

Methods

sizeOf :: Pixel YCbCr e -> Int #

alignment :: Pixel YCbCr e -> Int #

peekElemOff :: Ptr (Pixel YCbCr e) -> Int -> IO (Pixel YCbCr e) #

pokeElemOff :: Ptr (Pixel YCbCr e) -> Int -> Pixel YCbCr e -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Pixel YCbCr e) #

pokeByteOff :: Ptr b -> Int -> Pixel YCbCr e -> IO () #

peek :: Ptr (Pixel YCbCr e) -> IO (Pixel YCbCr e) #

poke :: Ptr (Pixel YCbCr e) -> Pixel YCbCr e -> IO () #

data Pixel YCbCr Source # 
data Pixel YCbCr = PixelYCbCr !e !e !e
type Components YCbCr e Source # 
type Components YCbCr e = (e, e, e)

data YCbCrA Source #

YCbCr color space with Alpha channel.

Constructors

LumaYCbCrA

Luma component (commonly denoted as Y')

CBlueYCbCrA

Blue difference chroma component

CRedYCbCrA

Red difference chroma component

AlphaYCbCrA

Alpha component.

Instances

Bounded YCbCrA Source # 
Enum YCbCrA Source # 
Eq YCbCrA Source # 

Methods

(==) :: YCbCrA -> YCbCrA -> Bool #

(/=) :: YCbCrA -> YCbCrA -> Bool #

Show YCbCrA Source # 
Elevator e => AlphaSpace YCbCrA e Source # 

Associated Types

type Opaque YCbCrA :: * Source #

Elevator e => ColorSpace YCbCrA e Source # 

Associated Types

type Components YCbCrA e :: * Source #

Methods

toComponents :: Pixel YCbCrA e -> Components YCbCrA e Source #

fromComponents :: Components YCbCrA e -> Pixel YCbCrA e Source #

promote :: e -> Pixel YCbCrA e Source #

getPxC :: Pixel YCbCrA e -> YCbCrA -> e Source #

setPxC :: Pixel YCbCrA e -> YCbCrA -> e -> Pixel YCbCrA e Source #

mapPxC :: (YCbCrA -> e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

foldlPx2 :: (b -> e -> e -> b) -> b -> Pixel YCbCrA e -> Pixel YCbCrA e -> b Source #

liftPx :: (e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

liftPx2 :: (e -> e -> e) -> Pixel YCbCrA e -> Pixel YCbCrA e -> Pixel YCbCrA e Source #

foldrPx :: (e -> b -> b) -> b -> Pixel YCbCrA e -> b Source #

foldlPx :: (b -> e -> b) -> b -> Pixel YCbCrA e -> b Source #

foldl1Px :: (e -> e -> e) -> Pixel YCbCrA e -> e Source #

Elevator e => ToYCbCrA YCbCrA e Source # 
Elevator e => ToYCbCr YCbCrA e Source # 
Elevator e => ToCMYKA YCbCrA e Source # 
Elevator e => ToCMYK YCbCrA e Source # 
Elevator e => ToHSIA YCbCrA e Source # 
Elevator e => ToHSI YCbCrA e Source # 
Elevator e => ToRGBA YCbCrA e Source # 
Elevator e => ToRGB YCbCrA e Source # 
Elevator e => ToYA YCbCrA e Source # 
Elevator e => ToY YCbCrA e Source # 
Functor (Pixel YCbCrA) Source # 

Methods

fmap :: (a -> b) -> Pixel YCbCrA a -> Pixel YCbCrA b #

(<$) :: a -> Pixel YCbCrA b -> Pixel YCbCrA a #

Applicative (Pixel YCbCrA) Source # 

Methods

pure :: a -> Pixel YCbCrA a #

(<*>) :: Pixel YCbCrA (a -> b) -> Pixel YCbCrA a -> Pixel YCbCrA b #

liftA2 :: (a -> b -> c) -> Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA c #

(*>) :: Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA b #

(<*) :: Pixel YCbCrA a -> Pixel YCbCrA b -> Pixel YCbCrA a #

Foldable (Pixel YCbCrA) Source # 

Methods

fold :: Monoid m => Pixel YCbCrA m -> m #

foldMap :: Monoid m => (a -> m) -> Pixel YCbCrA a -> m #

foldr :: (a -> b -> b) -> b -> Pixel YCbCrA a -> b #

foldr' :: (a -> b -> b) -> b -> Pixel YCbCrA a -> b #

foldl :: (b -> a -> b) -> b -> Pixel YCbCrA a -> b #

foldl' :: (b -> a -> b) -> b -> Pixel YCbCrA a -> b #

foldr1 :: (a -> a -> a) -> Pixel YCbCrA a -> a #

foldl1 :: (a -> a -> a) -> Pixel YCbCrA a -> a #

toList :: Pixel YCbCrA a -> [a] #

null :: Pixel YCbCrA a -> Bool #

length :: Pixel YCbCrA a -> Int #

elem :: Eq a => a -> Pixel YCbCrA a -> Bool #

maximum :: Ord a => Pixel YCbCrA a -> a #

minimum :: Ord a => Pixel YCbCrA a -> a #

sum :: Num a => Pixel YCbCrA a -> a #

product :: Num a => Pixel YCbCrA a -> a #

Eq e => Eq (Pixel YCbCrA e) Source # 

Methods

(==) :: Pixel YCbCrA e -> Pixel YCbCrA e -> Bool #

(/=) :: Pixel YCbCrA e -> Pixel YCbCrA e -> Bool #

Ord e => Ord (Pixel YCbCrA e) Source #