JuicyPixels-3.2.9.5: Picture loading/serialization (in png, jpeg, bitmap, gif, tga, tiff and radiance)

Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Saving

Description

Helper functions to save dynamic images to other file format with automatic color space/sample format conversion done automatically.

Synopsis

Documentation

imageToJpg :: Int -> DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as JPEG, make all color conversion and such. Equivalent of decodeImage for jpeg encoding Save Y or YCbCr Jpeg only, all other colorspaces are converted. To save a RGB or CMYK JPEG file, use the encodeDirectJpegAtQualityWithMetadata function

imageToPng :: DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as PNG, make all color conversion and such. Equivalent of decodeImage for PNG encoding

imageToGif :: DynamicImage -> Either String ByteString Source #

This function will try to do anything to encode an image as a gif, make all color conversion and quantization. Equivalent of decodeImage for gif encoding

imageToBitmap :: DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as bitmap, make all color conversion and such. Equivalent of decodeImage for Bitmap encoding

imageToTiff :: DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as a Tiff, make all color conversion and such. Equivalent of decodeImage for Tiff encoding

imageToRadiance :: DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as RADIANCE, make all color conversion and such. Equivalent of decodeImage for radiance encoding

imageToTga :: DynamicImage -> ByteString Source #

This function will try to do anything to encode an image as a tga, make all color conversion and quantization. Equivalent of decodeImage for tga encoding