Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
encodeBitmap :: BmpEncodable pixel => Image pixel -> ByteStringJuicyPixels Codec.Picture Encode an image into a bytestring in .bmp format ready to be written on disk.
encodeDynamicBitmap :: DynamicImage -> Either String ByteStringJuicyPixels Codec.Picture Encode a dynamic image in BMP if possible, supported images are:
pixelMap :: (Pixel a, Pixel b) => (a -> b) -> Image a -> Image bJuicyPixels 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)
readBitmap :: FilePath -> IO (Either String DynamicImage)JuicyPixels Codec.Picture Try to load a .bmp file. The colorspace would be RGB, RGBA or Y.
writeBitmap :: BmpEncodable pixel => FilePath -> Image pixel -> IO ()JuicyPixels Codec.Picture Write an image in a file use the bitmap format.
writeDynamicBitmap :: FilePath -> DynamicImage -> IO (Either String Bool)JuicyPixels Codec.Picture Write a dynamic image in a .bmp image file if possible. The same restriction as encodeDynamicBitmap apply.
-
Modules used for Bitmap file (.bmp) file loading and writing
decodeBitmap :: ByteString -> Either String DynamicImageJuicyPixels Codec.Picture.Bitmap Try to decode a bitmap image. Right now this function can output the following image:
decodeBitmapWithMetadata :: ByteString -> Either String (DynamicImage, Metadatas)JuicyPixels Codec.Picture.Bitmap Same as decodeBitmap but also extracts metadata.
decodeBitmapWithPaletteAndMetadata :: ByteString -> Either String (PalettedImage, Metadatas)JuicyPixels Codec.Picture.Bitmap Same as decodeBitmap but also extracts metadata and provide separated palette.