Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. type TypeMap = HashMap TypeRep Dynamic

    yesod-core Yesod.Core.Types

    No documentation available.

  2. foldl1Map :: forall (f :: Type -> Type) b a . Foldable f => (b -> b -> b) -> (a -> b) -> T f a -> b

    non-empty Data.NonEmpty

    It holds:

    foldl1Map f g = foldl1 f . fmap g
    
    but foldl1Map does not need a Functor instance.

  3. colorMap :: Pixel a => (PixelBaseComponent a -> PixelBaseComponent a) -> a -> a

    JuicyPixels Codec.Picture

    Apply a function to each component of a pixel. If the color type possess an alpha (transparency channel), it is treated like the other color components.

  4. decodeBitmap :: ByteString -> Either String DynamicImage

    JuicyPixels Codec.Picture

    Try to decode a bitmap image. Right now this function can output the following image:

  5. dynamicMap :: (forall pixel . Pixel pixel => Image pixel -> a) -> DynamicImage -> a

    JuicyPixels Codec.Picture

    Helper function to help extract information from dynamic image. To get the width of a dynamic image, you can use the following snippet:

    dynWidth :: DynamicImage -> Int
    dynWidth img = dynamicMap imageWidth img
    

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

    JuicyPixels Codec.Picture

    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)
    

  7. encodeBitmap :: BmpEncodable pixel => Image pixel -> ByteString

    JuicyPixels Codec.Picture

    Encode an image into a bytestring in .bmp format ready to be written on disk.

  8. encodeDynamicBitmap :: DynamicImage -> Either String ByteString

    JuicyPixels Codec.Picture

    Encode a dynamic image in BMP if possible, supported images are:

  9. 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)
    

  10. readBitmap :: FilePath -> IO (Either String DynamicImage)

    JuicyPixels Codec.Picture

    Try to load a .bmp file. The colorspace would be RGB, RGBA or Y.

Page 478 of many | Previous | Next