Codec.Picture.Tiff.Internal.Types

JuicyPixels-3.3.9: 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 #

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 #

putP :: a -> b -> Put #

#### Instances

Instances details

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

data Endianness #

Constructors

EndianLittle |
EndianBig |

#### Instances

Instances details

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

data TiffHeader #

Constructors

TiffHeader |
Fields hdrEndianness :: !Endianness hdrOffset :: !Word32

#### Instances

Instances details

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

data TiffPlanarConfiguration #

Constructors

PlanarConfigContig |
PlanarConfigSeparate |

data TiffCompression #

Constructors

CompressionNone |
CompressionModifiedRLE |
CompressionLZW |
CompressionJPEG |
CompressionPackBit |

data IfdType #

Constructors

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

#### Instances

Instances details

NFData IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods rnf :: IfdType -> () #
Generic IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Associated Types
type Rep IfdType |
Instance details Defined in Codec.Picture.Tiff.Internal.Types type Rep IfdType = D1 ('MetaData "IfdType" "Codec.Picture.Tiff.Internal.Types" "JuicyPixels-3.3.9-D4GSBtW9OfK2GKVIljLKj0" 'False) (((C1 ('MetaCons "TypeByte" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeAscii" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeShort" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TypeLong" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeRational" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSByte" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TypeUndefined" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeSignedShort" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSignedLong" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TypeSignedRational" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeFloat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDouble" 'PrefixI 'False) (U1 :: Type -> Type)))))
Methods from :: IfdType -> Rep IfdType x # to :: Rep IfdType x -> IfdType #
Show IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> IfdType -> ShowS # show :: IfdType -> String # showList :: [IfdType] -> ShowS #
Eq IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: IfdType -> IfdType -> Bool # (/=) :: IfdType -> IfdType -> Bool #
BinaryParam Endianness IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get IfdType # putP :: Endianness -> IfdType -> Put #
type Rep IfdType # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types type Rep IfdType = D1 ('MetaData "IfdType" "Codec.Picture.Tiff.Internal.Types" "JuicyPixels-3.3.9-D4GSBtW9OfK2GKVIljLKj0" 'False) (((C1 ('MetaCons "TypeByte" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeAscii" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeShort" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TypeLong" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeRational" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSByte" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TypeUndefined" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeSignedShort" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSignedLong" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TypeSignedRational" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeFloat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDouble" 'PrefixI 'False) (U1 :: Type -> Type)))))

data TiffColorspace #

Constructors

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

data TiffSampleFormat #

Constructors

TiffSampleUint |
TiffSampleInt |
TiffSampleFloat |
TiffSampleUnknown |

#### Instances

Instances details

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

data ImageFileDirectory #

Constructors

ImageFileDirectory |
Fields ifdIdentifier :: !ExifTag ifdType :: !IfdType ifdCount :: !Word32 ifdOffset :: !Word32 ifdExtended :: !ExifData

#### Instances

Instances details

NFData ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods rnf :: ImageFileDirectory -> () #
Generic ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Associated Types
type Rep ImageFileDirectory |
Instance details Defined in Codec.Picture.Tiff.Internal.Types type Rep ImageFileDirectory = D1 ('MetaData "ImageFileDirectory" "Codec.Picture.Tiff.Internal.Types" "JuicyPixels-3.3.9-D4GSBtW9OfK2GKVIljLKj0" 'False) (C1 ('MetaCons "ImageFileDirectory" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ifdIdentifier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExifTag) :*: S1 ('MetaSel ('Just "ifdType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IfdType)) :*: (S1 ('MetaSel ('Just "ifdCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "ifdOffset") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "ifdExtended") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExifData)))))
Methods from :: ImageFileDirectory -> Rep ImageFileDirectory x # to :: Rep ImageFileDirectory x -> ImageFileDirectory #
Show ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> ImageFileDirectory -> ShowS # show :: ImageFileDirectory -> String # showList :: [ImageFileDirectory] -> ShowS #
Eq ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: ImageFileDirectory -> ImageFileDirectory -> Bool # (/=) :: ImageFileDirectory -> ImageFileDirectory -> Bool #
BinaryParam Endianness ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ImageFileDirectory # putP :: Endianness -> ImageFileDirectory -> Put #
BinaryParam Endianness [ImageFileDirectory] # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get [ImageFileDirectory] # putP :: Endianness -> [ImageFileDirectory] -> Put #
BinaryParam ByteString (TiffHeader, [[ImageFileDirectory]]) # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: ByteString -> Get (TiffHeader, [[ImageFileDirectory]]) # putP :: ByteString -> (TiffHeader, [[ImageFileDirectory]]) -> Put #
BinaryParam (Endianness, Int, ImageFileDirectory) ExifData # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: (Endianness, Int, ImageFileDirectory) -> Get ExifData # putP :: (Endianness, Int, ImageFileDirectory) -> ExifData -> Put #
type Rep ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types type Rep ImageFileDirectory = D1 ('MetaData "ImageFileDirectory" "Codec.Picture.Tiff.Internal.Types" "JuicyPixels-3.3.9-D4GSBtW9OfK2GKVIljLKj0" 'False) (C1 ('MetaCons "ImageFileDirectory" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ifdIdentifier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExifTag) :*: S1 ('MetaSel ('Just "ifdType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IfdType)) :*: (S1 ('MetaSel ('Just "ifdCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "ifdOffset") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "ifdExtended") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExifData)))))

data ExtraSample #

Constructors

ExtraSampleUnspecified | 0
ExtraSampleAssociatedAlpha | 1
ExtraSampleUnassociatedAlpha | 2

data Predictor #

Constructors

PredictorNone |
PredictorHorizontalDifferencing |

#### Instances

Instances details

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

planarConfgOfConstant :: Word32 -> Get TiffPlanarConfiguration #

constantToPlaneConfiguration :: TiffPlanarConfiguration -> Word16 #

unpackSampleFormat :: Word32 -> Get TiffSampleFormat #

packSampleFormat :: TiffSampleFormat -> Word32 #

word16OfTag :: ExifTag -> Word16 #

Convert a tag to it's corresponding value.

unpackPhotometricInterpretation :: Word32 -> Get TiffColorspace #

packPhotometricInterpretation :: TiffColorspace -> Word16 #

codeOfExtraSample :: ExtraSample -> Word16 #

unPackCompression :: Word32 -> Get TiffCompression #

packCompression :: TiffCompression -> Word16 #

predictorOfConstant :: Word32 -> Get Predictor #