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. pixelBaseIndex :: Pixel a => Image a -> Int -> Int -> Int

    JuicyPixels Codec.Picture.Types

    Calculate the index for the begining of the pixel

  2. pixelFold :: forall acc pixel . Pixel pixel => (acc -> Int -> Int -> pixel -> acc) -> acc -> Image pixel -> acc

    JuicyPixels Codec.Picture.Types

    Fold over the pixel of an image with a raster scan order: from top to bottom, left to right

  3. pixelFoldM :: (Pixel pixel, Monad m) => (acc -> Int -> Int -> pixel -> m acc) -> acc -> Image pixel -> m acc

    JuicyPixels Codec.Picture.Types

    Fold over the pixel of an image with a raster scan order: from top to bottom, left to right, carrying out a state

  4. pixelFoldMap :: forall m px . (Pixel px, Monoid m) => (px -> m) -> Image px -> m

    JuicyPixels Codec.Picture.Types

    Fold over the pixel of an image with a raster scan order: from top to bottom, left to right. This functions is analog to the foldMap from the Foldable typeclass, but due to the Pixel constraint, Image cannot be made an instance of it.

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

    JuicyPixels Codec.Picture.Types

    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)
    

  6. pixelMapXY :: (Pixel a, Pixel b) => (Int -> Int -> a -> b) -> Image a -> Image b

    JuicyPixels Codec.Picture.Types

    Just like pixelMap only the function takes the pixel coordinates as additional parameters.

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

    JuicyPixels Codec.Picture.Types

    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.

  8. promotePixel :: ColorConvertible a b => a -> b

    JuicyPixels Codec.Picture.Types

    Convert a pixel type to another pixel type. This operation should never lose any data.

  9. readPackedPixelAt :: forall m px . (Pixel px, PackeablePixel px, Storable (PackedRepresentation px), PrimMonad m) => MutableImage (PrimState m) px -> Int -> m px

    JuicyPixels Codec.Picture.Types

    Read a packeable pixel from an image. Equivalent to unsafeReadPixel

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

    JuicyPixels Codec.Picture.Types

    Same as pixelAt but for mutable images.

Page 109 of many | Previous | Next