Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Brillo.Juicy
Synopsis
- fromDynamicImage :: DynamicImage -> Maybe Picture
- fromImageRGBA8 :: Image PixelRGBA8 -> Picture
- fromImageRGB8 :: Image PixelRGB8 -> Picture
- fromImageY8 :: Image Pixel8 -> Picture
- fromImageYA8 :: Image PixelYA8 -> Picture
- fromImageYCbCr8 :: Image PixelYCbCr8 -> Picture
- loadJuicy :: FilePath -> IO (Maybe Picture)
- loadJuicyWithMetadata :: FilePath -> IO (Maybe (Picture, Metadatas))
- loadJuicyJPG :: FilePath -> IO (Maybe Picture)
- loadJuicyPNG :: FilePath -> IO (Maybe Picture)
- loadBMP :: FilePath -> IO Picture
Conversion from JuicyPixels' types to brillo' Picture
fromDynamicImage :: DynamicImage -> Maybe Picture Source #
Tries to convert a DynamicImage
from JuicyPixels to a brillo Picture
.
All formats except RGBF and YF should successfully yield a Picture
.
fromImageRGBA8 :: Image PixelRGBA8 -> Picture Source #
O(N) conversion from PixelRGBA8
image to brillo Picture
,
where N is the number of pixels.
fromImageRGB8 :: Image PixelRGB8 -> Picture Source #
Creation of a brillo Picture
by promoting (through promoteImage
)
the PixelRGB8
image to PixelRGBA8
and calling fromImageRGBA8
.
fromImageY8 :: Image Pixel8 -> Picture Source #
Creation of a brillo Picture
by promoting (through promoteImage
)
the PixelY8
image to PixelRGBA8
and calling fromImageRGBA8
.
fromImageYA8 :: Image PixelYA8 -> Picture Source #
Creation of a brillo Picture
by promoting (through promoteImage
)
the PixelYA8
image to PixelRGBA8
and calling fromImageRGBA8
.
fromImageYCbCr8 :: Image PixelYCbCr8 -> Picture Source #
Creation of a brillo Picture
by promoting (through promoteImage
)
the PixelYCbCr8
image to PixelRGBA8
and calling fromImageRGBA8
.
Loading a brillo Picture from a file through JuicyPixels
loadJuicy :: FilePath -> IO (Maybe Picture) Source #
Tries to load an image file into a Picture
using readImage
from JuicyPixels.
It means it'll try to successively read the content
as an image in the following order,
until it succeeds (or fails on all of them):
jpeg, png, bmp, gif, hdr (the last two are not supported)
This is handy when you don't know
what format the image contained in the file is encoded with.
If you know the format in advance,
use loadBMP
, loadJuicyJPG
or loadJuicyPNG