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

Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Tga

Description

Module implementing function to read and write Targa (*.tga) files.

Synopsis

Documentation

decodeTga :: ByteString -> Either String DynamicImage Source #

Transform a raw tga image to an image, without modifying the underlying pixel type.

This function can output the following images:

decodeTgaWithMetadata :: ByteString -> Either String (DynamicImage, Metadatas) Source #

Equivalent to decodeTga but also provide metadata

class TgaSaveable a Source #

This typeclass determine if a pixel can be saved in the TGA format.

Minimal complete definition

tgaDataOfImage, tgaPixelDepthOfImage, tgaTypeOfImage

encodeTga :: TgaSaveable px => Image px -> ByteString Source #

Transform a compatible image to a raw bytestring representing a Targa file.

writeTga :: TgaSaveable pixel => FilePath -> Image pixel -> IO () Source #

Helper function to directly write an image a tga on disk.