JuicyPixels-3.3.6: 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 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 ExifTag # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ExifTag # putP :: Endianness -> ExifTag -> Put #
BinaryParam Endianness ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods getP :: Endianness -> Get ImageFileDirectory # putP :: Endianness -> ImageFileDirectory -> 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 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

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

Eq TiffHeader # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods (==) :: TiffHeader -> TiffHeader -> Bool # (/=) :: TiffHeader -> TiffHeader -> Bool #
Show TiffHeader # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> TiffHeader -> ShowS # show :: TiffHeader -> String # showList :: [TiffHeader] -> ShowS #
Binary TiffHeader # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods put :: TiffHeader -> Put # get :: Get TiffHeader # putList :: [TiffHeader] -> 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 #

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

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

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

Show ImageFileDirectory # |
Instance details Defined in Codec.Picture.Tiff.Internal.Types Methods showsPrec :: Int -> ImageFileDirectory -> ShowS # show :: ImageFileDirectory -> String # showList :: [ImageFileDirectory] -> ShowS #
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 #

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 #