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

Safe Haskell | None
Language | Haskell2010

Codec.Picture.Tiff.Internal.Types

Synopsis

- class BinaryParam a b where
  - getP :: a -> Get b
  - putP :: a -> b -> Put
- data Endianness
  - = EndianLittle
  - | EndianBig
- data TiffHeader = TiffHeader {
  - hdrEndianness :: !Endianness
  - hdrOffset :: !Word32
  }
- data TiffPlanarConfiguration
  - = PlanarConfigContig
  - | PlanarConfigSeparate
- data TiffCompression
  - = CompressionNone
  - | CompressionModifiedRLE
  - | CompressionLZW
  - | CompressionJPEG
  - | CompressionPackBit
- data IfdType
  - = TypeByte
  - | TypeAscii
  - | TypeShort
  - | TypeLong
  - | TypeRational
  - | TypeSByte
  - | TypeUndefined
  - | TypeSignedShort
  - | TypeSignedLong
  - | TypeSignedRational
  - | TypeFloat
  - | TypeDouble
- data TiffColorspace
  - = TiffMonochromeWhite0
  - | TiffMonochrome
  - | TiffRGB
  - | TiffPaleted
  - | TiffTransparencyMask
  - | TiffCMYK
  - | TiffYCbCr
  - | TiffCIELab
- data TiffSampleFormat
  - = TiffSampleUint
  - | TiffSampleInt
  - | TiffSampleFloat
  - | TiffSampleUnknown
- data ImageFileDirectory = ImageFileDirectory {
  - ifdIdentifier :: !ExifTag
  - ifdType :: !IfdType
  - ifdCount :: !Word32
  - ifdOffset :: !Word32
  - ifdExtended :: !ExifData
  }
- data ExtraSample
  - = ExtraSampleUnspecified
  - | ExtraSampleAssociatedAlpha
  - | ExtraSampleUnassociatedAlpha
- data Predictor
  - = PredictorNone
  - | PredictorHorizontalDifferencing
- planarConfgOfConstant :: Word32 -> Get TiffPlanarConfiguration
- constantToPlaneConfiguration :: TiffPlanarConfiguration -> Word16
- unpackSampleFormat :: Word32 -> Get TiffSampleFormat
- packSampleFormat :: TiffSampleFormat -> Word32
- word16OfTag :: ExifTag -> Word16
- unpackPhotometricInterpretation :: Word32 -> Get TiffColorspace
- packPhotometricInterpretation :: TiffColorspace -> Word16
- codeOfExtraSample :: ExtraSample -> Word16
- unPackCompression :: Word32 -> Get TiffCompression
- packCompression :: TiffCompression -> Word16
- predictorOfConstant :: Word32 -> Get Predictor

# Documentation

class BinaryParam a b where Source #

Because having a polymorphic get with endianness is to nice to pass on, introducing this helper type class, which is just a superset of Binary, but formalising a parameter passing into it.

Methods

getP :: a -> Get b Source #

putP :: a -> b -> Put Source #

Instances

BinaryParam Endianness Int32 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Int32 Source # putP :: Endianness -> Int32 -> Put Source #
BinaryParam Endianness Word16 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Word16 Source # putP :: Endianness -> Word16 -> Put Source #
BinaryParam Endianness Word32 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Word32 Source # putP :: Endianness -> Word32 -> Put Source #
BinaryParam Endianness ExifTag Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ExifTag Source # putP :: Endianness -> ExifTag -> Put Source #
BinaryParam Endianness ImageFileDirectory Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ImageFileDirectory Source # putP :: Endianness -> ImageFileDirectory -> Put Source #
BinaryParam Endianness IfdType Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get IfdType Source # putP :: Endianness -> IfdType -> Put Source #
BinaryParam Endianness [ImageFileDirectory] Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get [ImageFileDirectory] Source # putP :: Endianness -> [ImageFileDirectory] -> Put Source #
BinaryParam ByteString (TiffHeader, [[ImageFileDirectory]]) Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: ByteString -> Get (TiffHeader, [[ImageFileDirectory]]) Source # putP :: ByteString -> (TiffHeader, [[ImageFileDirectory]]) -> Put Source #
BinaryParam (Endianness, Int, ImageFileDirectory) ExifData Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: (Endianness, Int, ImageFileDirectory) -> Get ExifData Source # putP :: (Endianness, Int, ImageFileDirectory) -> ExifData -> Put Source #

data Endianness Source #

Constructors

EndianLittle |
EndianBig |

Instances

Eq Endianness Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: Endianness -> Endianness -> Bool Source # (/=) :: Endianness -> Endianness -> Bool Source #
Show Endianness Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> Endianness -> ShowS Source # show :: Endianness -> String Source # showList :: [Endianness] -> ShowS Source #
Binary Endianness Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods put :: Endianness -> Put Source # get :: Get Endianness Source # putList :: [Endianness] -> Put Source #
BinaryParam Endianness Int32 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Int32 Source # putP :: Endianness -> Int32 -> Put Source #
BinaryParam Endianness Word16 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Word16 Source # putP :: Endianness -> Word16 -> Put Source #
BinaryParam Endianness Word32 Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get Word32 Source # putP :: Endianness -> Word32 -> Put Source #
BinaryParam Endianness ExifTag Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ExifTag Source # putP :: Endianness -> ExifTag -> Put Source #
BinaryParam Endianness ImageFileDirectory Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ImageFileDirectory Source # putP :: Endianness -> ImageFileDirectory -> Put Source #
BinaryParam Endianness IfdType Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get IfdType Source # putP :: Endianness -> IfdType -> Put Source #
BinaryParam Endianness [ImageFileDirectory] Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get [ImageFileDirectory] Source # putP :: Endianness -> [ImageFileDirectory] -> Put Source #
BinaryParam (Endianness, Int, ImageFileDirectory) ExifData Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: (Endianness, Int, ImageFileDirectory) -> Get ExifData Source # putP :: (Endianness, Int, ImageFileDirectory) -> ExifData -> Put Source #

data TiffHeader Source #

Constructors

TiffHeader |

Fields

- hdrEndianness :: !Endianness
- hdrOffset :: !Word32

Instances

Eq TiffHeader Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: TiffHeader -> TiffHeader -> Bool Source # (/=) :: TiffHeader -> TiffHeader -> Bool Source #
Show TiffHeader Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> TiffHeader -> ShowS Source # show :: TiffHeader -> String Source # showList :: [TiffHeader] -> ShowS Source #
Binary TiffHeader Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods put :: TiffHeader -> Put Source # get :: Get TiffHeader Source # putList :: [TiffHeader] -> Put Source #
BinaryParam ByteString (TiffHeader, [[ImageFileDirectory]]) Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: ByteString -> Get (TiffHeader, [[ImageFileDirectory]]) Source # putP :: ByteString -> (TiffHeader, [[ImageFileDirectory]]) -> Put Source #

data TiffPlanarConfiguration Source #

Constructors

PlanarConfigContig |
PlanarConfigSeparate |

data TiffCompression Source #

Constructors

CompressionNone |
CompressionModifiedRLE |
CompressionLZW |
CompressionJPEG |
CompressionPackBit |

data IfdType Source #

Constructors

TypeByte |
TypeAscii |
TypeShort |
TypeLong |
TypeRational |
TypeSByte |
TypeUndefined |
TypeSignedShort |
TypeSignedLong |
TypeSignedRational |
TypeFloat |
TypeDouble |

Instances

Show IfdType Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> IfdType -> ShowS Source # show :: IfdType -> String Source # showList :: [IfdType] -> ShowS Source #
BinaryParam Endianness IfdType Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get IfdType Source # putP :: Endianness -> IfdType -> Put Source #

data TiffColorspace Source #

Constructors

TiffMonochromeWhite0 | 0
TiffMonochrome | 1
TiffRGB | 2
TiffPaleted | 3
TiffTransparencyMask | 4
TiffCMYK | 5
TiffYCbCr | 6
TiffCIELab | 8

data TiffSampleFormat Source #

Constructors

TiffSampleUint |
TiffSampleInt |
TiffSampleFloat |
TiffSampleUnknown |

Instances

Eq TiffSampleFormat Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: TiffSampleFormat -> TiffSampleFormat -> Bool Source # (/=) :: TiffSampleFormat -> TiffSampleFormat -> Bool Source #

data ImageFileDirectory Source #

Constructors

ImageFileDirectory |

Fields

- ifdIdentifier :: !ExifTag
- ifdType :: !IfdType
- ifdCount :: !Word32
- ifdOffset :: !Word32
- ifdExtended :: !ExifData

Instances

Show ImageFileDirectory Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> ImageFileDirectory -> ShowS Source # show :: ImageFileDirectory -> String Source # showList :: [ImageFileDirectory] -> ShowS Source #
BinaryParam Endianness ImageFileDirectory Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ImageFileDirectory Source # putP :: Endianness -> ImageFileDirectory -> Put Source #
BinaryParam Endianness [ImageFileDirectory] Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get [ImageFileDirectory] Source # putP :: Endianness -> [ImageFileDirectory] -> Put Source #
BinaryParam ByteString (TiffHeader, [[ImageFileDirectory]]) Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: ByteString -> Get (TiffHeader, [[ImageFileDirectory]]) Source # putP :: ByteString -> (TiffHeader, [[ImageFileDirectory]]) -> Put Source #
BinaryParam (Endianness, Int, ImageFileDirectory) ExifData Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: (Endianness, Int, ImageFileDirectory) -> Get ExifData Source # putP :: (Endianness, Int, ImageFileDirectory) -> ExifData -> Put Source #

data ExtraSample Source #

Constructors

ExtraSampleUnspecified | 0
ExtraSampleAssociatedAlpha | 1
ExtraSampleUnassociatedAlpha | 2

data Predictor Source #

Constructors

PredictorNone |
PredictorHorizontalDifferencing |

Instances

Eq Predictor Source # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: Predictor -> Predictor -> Bool Source # (/=) :: Predictor -> Predictor -> Bool Source #

planarConfgOfConstant :: Word32 -> Get TiffPlanarConfiguration Source #

constantToPlaneConfiguration :: TiffPlanarConfiguration -> Word16 Source #

unpackSampleFormat :: Word32 -> Get TiffSampleFormat Source #

packSampleFormat :: TiffSampleFormat -> Word32 Source #

word16OfTag :: ExifTag -> Word16 Source #

Convert a tag to it's corresponding value.

unpackPhotometricInterpretation :: Word32 -> Get TiffColorspace Source #

packPhotometricInterpretation :: TiffColorspace -> Word16 Source #

codeOfExtraSample :: ExtraSample -> Word16 Source #

unPackCompression :: Word32 -> Get TiffCompression Source #

packCompression :: TiffCompression -> Word16 Source #

predictorOfConstant :: Word32 -> Get Predictor Source #