JuicyPixels-1.0: Picture loading/serialization (in png, jpeg and bitmap)

Codec.Picture.Jpg

Description

Module used for JPEG file loading and writing.

Synopsis

Documentation

readJpeg :: FilePath -> IO (Either String DynamicImage)Source

Try to load a jpeg file and decompress. The colorspace is still YCbCr if you want to perform computation on the luma part. You can convert it to RGB using colorSpaceConversion

decodeJpeg :: ByteString -> Either String DynamicImageSource

Try to decompress a jpeg file and decompress. The colorspace is still YCbCr if you want to perform computation on the luma part. You can convert it to RGB using colorSpaceConversion

This function can output the following pixel types :

  • PixelY8
  • PixelYCbCr8