Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Module implementing TIFF decoding.
Supported compression schemes:
- Uncompressed
- PackBits
- LZW
Supported bit depth:
- 2 bits
- 4 bits
- 8 bits
- 16 bits
Synopsis
- decodeTiff :: ByteString -> Either String DynamicImage
- decodeTiffWithMetadata :: ByteString -> Either String (DynamicImage, Metadatas)
- decodeTiffWithPaletteAndMetadata :: ByteString -> Either String (PalettedImage, Metadatas)
- class Pixel px => TiffSaveable px
- encodeTiff :: forall px. TiffSaveable px => Image px -> ByteString
- writeTiff :: TiffSaveable pixel => FilePath -> Image pixel -> IO ()
Documentation
decodeTiff :: ByteString -> Either String DynamicImage Source #
Decode a tiff encoded image while preserving the underlying pixel type (except for Y32 which is truncated to 16 bits).
This function can output the following images:
decodeTiffWithMetadata :: ByteString -> Either String (DynamicImage, Metadatas) Source #
Like decodeTiff
but also provides some metdata present
in the Tiff file.
The metadata extracted are the DpiX
&
DpiY
information alongside the EXIF informations.
decodeTiffWithPaletteAndMetadata :: ByteString -> Either String (PalettedImage, Metadatas) Source #
Decode TIFF and provide separated palette and metadata
class Pixel px => TiffSaveable px Source #
Class defining which pixel types can be serialized in a Tiff file.
colorSpaceOfPixel
Instances
TiffSaveable Pixel16 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable Pixel32 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable Pixel8 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelCMYK16 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelCMYK8 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelF Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelRGB16 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelRGB8 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelRGBA16 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelRGBA8 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelYA16 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelYA8 Source # | |
Defined in Codec.Picture.Tiff | |
TiffSaveable PixelYCbCr8 Source # | |
Defined in Codec.Picture.Tiff |
encodeTiff :: forall px. TiffSaveable px => Image px -> ByteString Source #
Transform an image into a Tiff encoded bytestring, ready to be written as a file.