Copyright | (c) Alexey Kuleshevich 2016 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
- module Graphics.Image.ColorSpace
- class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e where
- data Image arr cs e
- class Array arr cs e => ManifestArray arr cs e
- class ManifestArray arr cs e => SequentialArray arr cs e
- class ManifestArray arr cs e => MutableArray arr cs e where
- data MImage st arr cs e
- class Exchangable arr' arr
- data Border px
- data VU = VU
- data RD = RD
- data RS = RS
- data RP = RP
Documentation
module Graphics.Image.ColorSpace
class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e Source
Base array like representation for an image.
class Array arr cs e => ManifestArray arr cs e Source
Array representation that is actually has real data stored in memory, hence allowing for image indexing, forcing pixels into computed state etc.
index, deepSeqImage, (|*|), fold, eq
Array VU cs e => ManifestArray VU cs e Source | |
Array RS cs e => ManifestArray RS cs e Source | |
Array RP cs e => ManifestArray RP cs e Source |
class ManifestArray arr cs e => SequentialArray arr cs e Source
Array representation that allows computation, which depends on some specific order, consequently making it possible to be computed only sequentially.
ManifestArray VU cs e => SequentialArray VU cs e Source | |
ManifestArray RS cs e => SequentialArray RS cs e Source |
class ManifestArray arr cs e => MutableArray arr cs e Source
Array representation that supports mutation.
ManifestArray VU cs e => MutableArray VU cs e Source | |
ManifestArray RS cs e => MutableArray RS cs e Source |
class Exchangable arr' arr Source
Allows for changing an underlying image representation.
Exchangable arr arr Source | Changing to the same array representation as before is disabled and |
Exchangable VU RS Source | O(1) - Changes to Repa representation. |
Exchangable VU RP Source | O(1) - Changes to Repa representation. |
Exchangable RS VU Source | O(1) - Changes to Vector representation. |
Exchangable RS RP Source | O(1) - Changes computation strategy. |
Exchangable RS RD Source | O(1) - Delays manifest array. |
Exchangable RP VU Source | O(1) - Changes to Vector representation. |
Exchangable RP RS Source | O(1) - Changes computation strategy. |
Exchangable RP RD Source | O(1) - Delays manifest array. |
Exchangable RD RS Source | Computes delayed array sequentially. |
Exchangable RD RP Source | Computes delayed array in parallel. |
Approach to be used near the border during transformations, which, besides a pixel of interest, also use it's neighbors, consequently going out of bounds at the edges of an image.
Fill !px | Fill in a constant pixel. outside | Image | outside
( |
Wrap | Wrap around from the opposite border of the image. outside | Image | outside
|
Edge | Replicate the pixel at the edge. outside | Image | outside
|
Reflect | Mirror like reflection. outside | Image | outside
|
Continue | Also mirror like reflection, but without repeating the edge pixel. outside | Image | outside
|
Unboxed Vector
representation.
Show VU Source | |
Exchangable VU RS Source | O(1) - Changes to Repa representation. |
Exchangable VU RP Source | O(1) - Changes to Repa representation. |
Exchangable RS VU Source | O(1) - Changes to Vector representation. |
Exchangable RP VU Source | O(1) - Changes to Vector representation. |
ManifestArray VU cs e => MutableArray VU cs e Source | |
ManifestArray VU cs e => SequentialArray VU cs e Source | |
Array VU cs e => ManifestArray VU cs e Source | |
Elt VU cs e => Array VU cs e Source | |
data Image VU Source | |
type Elt VU cs e = (ColorSpace cs, Num e, Unbox e, Typeable * e, Unbox (PixelElt cs e), Unbox (Pixel cs e)) Source | |
data MImage st VU cs e Source |
Repa D
elayed Array representation, which allows for fusion of computation.
Show RD Source | |
Exchangable RS RD Source | O(1) - Delays manifest array. |
Exchangable RP RD Source | O(1) - Delays manifest array. |
Exchangable RD RS Source | Computes delayed array sequentially. |
Exchangable RD RP Source | Computes delayed array in parallel. |
Elt RD cs e => Array RD cs e Source | |
data Image RD Source | |
type Elt RD cs e = (ColorSpace cs, Num e, Typeable * e, Elt e, Unbox e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source |
Repa U
nboxed Array representation, which is computed sequentially.
Show RS Source | |
Exchangable VU RS Source | O(1) - Changes to Repa representation. |
Exchangable RS VU Source | O(1) - Changes to Vector representation. |
Exchangable RS RP Source | O(1) - Changes computation strategy. |
Exchangable RS RD Source | O(1) - Delays manifest array. |
Exchangable RP RS Source | O(1) - Changes computation strategy. |
Exchangable RD RS Source | Computes delayed array sequentially. |
ManifestArray RS cs e => MutableArray RS cs e Source | |
ManifestArray RS cs e => SequentialArray RS cs e Source | |
Array RS cs e => ManifestArray RS cs e Source | |
Elt RS cs e => Array RS cs e Source | |
data Image RS = RSImage !(Image RD cs e) Source | |
type Elt RS cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source | |
data MImage st RS cs e = MRSImage !(MImage st VU cs e) Source |
Repa U
nboxed Array representation, which is computed in parallel.
Show RP Source | |
Exchangable VU RP Source | O(1) - Changes to Repa representation. |
Exchangable RS RP Source | O(1) - Changes computation strategy. |
Exchangable RP VU Source | O(1) - Changes to Vector representation. |
Exchangable RP RS Source | O(1) - Changes computation strategy. |
Exchangable RP RD Source | O(1) - Delays manifest array. |
Exchangable RD RP Source | Computes delayed array in parallel. |
Array RP cs e => ManifestArray RP cs e Source | |
Elt RP cs e => Array RP cs e Source | |
data Image RP = RPImage !(Image RD cs e) Source | |
type Elt RP cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source |