Safe Haskell | None |
---|
Codec.Picture.Tga
Description
Module implementing function to read and write Targa (*.tga) files.
- decodeTga :: ByteString -> Either String DynamicImage
- class TgaSaveable a
- encodeTga :: TgaSaveable px => Image px -> ByteString
- writeTga :: TgaSaveable pixel => FilePath -> Image pixel -> IO ()
Documentation
decodeTga :: ByteString -> Either String DynamicImageSource
Transform a raw tga image to an image, without modifying the underlying pixel type.
This function can output the following pixel types:
- PixelY8
- PixelRGB8
- PixelRGBA8
class TgaSaveable a Source
This typeclass determine if a pixel can be saved in the TGA format.
encodeTga :: TgaSaveable px => Image px -> ByteStringSource
Transform a compatible image to a raw bytestring representing a Targa file.