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. class (Pixel a, Pixel b) => TransparentPixel a b | a -> b

    JuicyPixels Codec.Picture.Types

    Class modeling transparent pixel, should provide a method to combine transparent pixels

  2. convertPixel :: ColorSpaceConvertible a b => a -> b

    JuicyPixels Codec.Picture.Types

    Pass a pixel from a colorspace (say RGB) to the second one (say YCbCr)

  3. dynamicPixelMap :: (forall pixel . Pixel pixel => Image pixel -> Image pixel) -> DynamicImage -> DynamicImage

    JuicyPixels Codec.Picture.Types

    Equivalent of the pixelMap function for the dynamic images. You can perform pixel colorspace independant operations with this function. For instance, if you want to extract a square crop of any image, without caring about colorspace, you can use the following snippet.

    dynSquare :: DynamicImage -> DynamicImage
    dynSquare = dynamicPixelMap squareImage
    
    squareImage :: Pixel a => Image a -> Image a
    squareImage img = generateImage (\x y -> pixelAt img x y) edge edge
    where edge = min (imageWidth img) (imageHeight img)
    

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

    JuicyPixels Codec.Picture.Types

    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

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

    JuicyPixels Codec.Picture.Types

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

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

    JuicyPixels Codec.Picture.Types

    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)
    

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

    JuicyPixels Codec.Picture.Types

    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)
    

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

    JuicyPixels Codec.Picture.Types

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

  9. packPixel :: PackeablePixel a => a -> PackedRepresentation a

    JuicyPixels Codec.Picture.Types

    The packing function, allowing to transform to a primitive.

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

    JuicyPixels Codec.Picture.Types

    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

Page 108 of many | Previous | Next