Hoogle Search

Within LTS Haskell 24.41 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. imageIPixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) (Int, Int, pxa) pxb

    JuicyPixels Codec.Picture

    Traversal providing the pixel position with it's value. The traversal in raster order, from lef to right, then top to bottom. The traversal match pixelMapXY in spirit. Since 3.2.4

  2. imagePixels :: (Pixel pxa, Pixel pxb) => Traversal (Image pxa) (Image pxb) pxa pxb

    JuicyPixels Codec.Picture

    Traversal in "raster" order, from left to right the top to bottom. This traversal is matching pixelMap in spirit. Since 3.2.4

  3. mixWith :: Pixel a => (Int -> PixelBaseComponent a -> PixelBaseComponent a -> PixelBaseComponent a) -> a -> a -> a

    JuicyPixels Codec.Picture

    Call the function for every component of the pixels. For example for RGB pixels mixWith is declared like this:

    mixWith f (PixelRGB8 ra ga ba) (PixelRGB8 rb gb bb) =
    PixelRGB8 (f 0 ra rb) (f 1 ga gb) (f 2 ba bb)
    

  4. mixWithAlpha :: Pixel a => (Int -> PixelBaseComponent a -> PixelBaseComponent a -> PixelBaseComponent a) -> (PixelBaseComponent a -> PixelBaseComponent a -> PixelBaseComponent a) -> a -> a -> a

    JuicyPixels Codec.Picture

    Extension of the mixWith which separate the treatment of the color components of the alpha value (transparency component). For pixel without alpha components, it is equivalent to mixWith.

    mixWithAlpha f fa (PixelRGBA8 ra ga ba aa) (PixelRGB8 rb gb bb ab) =
    PixelRGBA8 (f 0 ra rb) (f 1 ga gb) (f 2 ba bb) (fa aa ab)
    

  5. mutablePixelBaseIndex :: Pixel a => MutableImage s a -> Int -> Int -> Int

    JuicyPixels Codec.Picture

    Calculate theindex for the begining of the pixel at position x y

  6. pixelAt :: Pixel a => Image a -> Int -> Int -> a

    JuicyPixels Codec.Picture

    Extract a pixel at a given position, (x, y), the origin is assumed to be at the corner top left, positive y to the bottom of the image

  7. pixelBaseIndex :: Pixel a => Image a -> Int -> Int -> Int

    JuicyPixels Codec.Picture

    Calculate the index for the begining of the pixel

  8. pixelMap :: (Pixel a, Pixel b) => (a -> b) -> Image a -> Image b

    JuicyPixels Codec.Picture

    map equivalent for an image, working at the pixel level. Little example : a brightness function for an rgb image

    brightnessRGB8 :: Int -> Image PixelRGB8 -> Image PixelRGB8
    brightnessRGB8 add = pixelMap brightFunction
    where up v = fromIntegral (fromIntegral v + add)
    brightFunction (PixelRGB8 r g b) =
    PixelRGB8 (up r) (up g) (up b)
    

  9. pixelOpacity :: Pixel a => a -> PixelBaseComponent a

    JuicyPixels Codec.Picture

    Return the opacity of a pixel, if the pixel has an alpha layer, return the alpha value. If the pixel doesn't have an alpha value, return a value representing the opaqueness.

  10. readPixel :: (Pixel a, PrimMonad m) => MutableImage (PrimState m) a -> Int -> Int -> m a

    JuicyPixels Codec.Picture

    Same as pixelAt but for mutable images.

Page 103 of many | Previous | Next