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

Safe Haskell | None
Language | Haskell2010

Codec.Picture.Jpg.Internal.Types

Description

A good explanation of the JPEG format, including diagrams, is given at: https://github.com/corkami/formats/blob/master/image/jpeg.md

The full spec (excluding EXIF): https://www.w3.org/Graphics/JPEG/itu-t81.pdf

Synopsis

- type MutableMacroBlock s a = STVector s a
- createEmptyMutableMacroBlock :: (Storable a, Num a) => ST s (MutableMacroBlock s a)
- printMacroBlock :: (Storable a, PrintfArg a) => MutableMacroBlock s a -> ST s String
- printPureMacroBlock :: (Storable a, PrintfArg a) => MacroBlock a -> String
- type DcCoefficient = Int16
- data JpgImage = JpgImage {
  - jpgFrame :: [JpgFrame]
  }
- data JpgComponent = JpgComponent {
  - componentIdentifier :: !Word8
  - horizontalSamplingFactor :: !Word8
  - verticalSamplingFactor :: !Word8
  - quantizationTableDest :: !Word8
  }
- data JpgFrameHeader = JpgFrameHeader {
  - jpgFrameHeaderLength :: !Word16
  - jpgSamplePrecision :: !Word8
  - jpgHeight :: !Word16
  - jpgWidth :: !Word16
  - jpgImageComponentCount :: !Word8
  - jpgComponents :: ![JpgComponent]
  }
- data JpgFrame
  - = JpgAppFrame !Word8 ByteString
  - | JpgAdobeAPP14 !JpgAdobeApp14
  - | JpgJFIF !JpgJFIFApp0
  - | JpgExif ![ImageFileDirectory]
  - | JpgExtension !Word8 ByteString
  - | JpgQuantTable ![JpgQuantTableSpec]
  - | JpgHuffmanTable ![(JpgHuffmanTableSpec, HuffmanPackedTree)]
  - | JpgScanBlob !JpgScanHeader !ByteString
  - | JpgScans !JpgFrameKind !JpgFrameHeader
  - | JpgIntervalRestart !Word16
- data JpgFrameKind
  - = JpgBaselineDCTHuffman
  - | JpgExtendedSequentialDCTHuffman
  - | JpgProgressiveDCTHuffman
  - | JpgLosslessHuffman
  - | JpgDifferentialSequentialDCTHuffman
  - | JpgDifferentialProgressiveDCTHuffman
  - | JpgDifferentialLosslessHuffman
  - | JpgExtendedSequentialArithmetic
  - | JpgProgressiveDCTArithmetic
  - | JpgLosslessArithmetic
  - | JpgDifferentialSequentialDCTArithmetic
  - | JpgDifferentialProgressiveDCTArithmetic
  - | JpgDifferentialLosslessArithmetic
  - | JpgQuantizationTable
  - | JpgHuffmanTableMarker
  - | JpgStartOfScan
  - | JpgEndOfImage
  - | JpgAppSegment Word8
  - | JpgExtensionSegment Word8
  - | JpgRestartInterval
  - | JpgRestartIntervalEnd Word8
- data JpgScanHeader = JpgScanHeader {
  - scanLength :: !Word16
  - scanComponentCount :: !Word8
  - scans :: [JpgScanSpecification]
  - spectralSelection :: (Word8, Word8)
  - successiveApproxHigh :: !Word8
  - successiveApproxLow :: !Word8
  }
- data JpgQuantTableSpec = JpgQuantTableSpec {
  - quantPrecision :: !Word8
  - quantDestination :: !Word8
  - quantTable :: MacroBlock Int16
  }
- data JpgHuffmanTableSpec = JpgHuffmanTableSpec {
  - huffmanTableClass :: !DctComponent
  - huffmanTableDest :: !Word8
  - huffSizes :: !(Vector Word8)
  - huffCodes :: !(Vector (Vector Word8))
  }
- data JpgImageKind
  - = BaseLineDCT
  - | ProgressiveDCT
- data JpgScanSpecification = JpgScanSpecification {
  - componentSelector :: !Word8
  - dcEntropyCodingTable :: !Word8
  - acEntropyCodingTable :: !Word8
  }
- data JpgColorSpace
  - = JpgColorSpaceYCbCr
  - | JpgColorSpaceYCC
  - | JpgColorSpaceY
  - | JpgColorSpaceYA
  - | JpgColorSpaceYCCA
  - | JpgColorSpaceYCCK
  - | JpgColorSpaceCMYK
  - | JpgColorSpaceRGB
  - | JpgColorSpaceRGBA
- data AdobeTransform
  - = AdobeUnknown
  - | AdobeYCbCr
  - | AdobeYCck
- data JpgAdobeApp14 = JpgAdobeApp14 {
  - _adobeDctVersion :: !Word16
  - _adobeFlag0 :: !Word16
  - _adobeFlag1 :: !Word16
  - _adobeTransform :: !AdobeTransform
  }
- data JpgJFIFApp0 = JpgJFIFApp0 {
  - _jfifUnit :: !JFifUnit
  - _jfifDpiX :: !Word16
  - _jfifDpiY :: !Word16
  - _jfifThumbnail :: !(Maybe Int)
  }
- data JFifUnit
  - = JFifUnitUnknown
  - | JFifPixelsPerInch
  - | JFifPixelsPerCentimeter
- newtype TableList a = TableList [a]
- newtype RestartInterval = RestartInterval Word16
- getJpgImage :: Get JpgImage
- calculateSize :: SizeCalculable a => a -> Int
- dctBlockSize :: Num a => a
- parseECS :: Get ByteString
- parseECS_simple :: Get ByteString
- skipUntilFrames :: Get ()
- skipFrameMarker :: Get ()
- parseFrameOfKind :: JpgFrameKind -> Get (Maybe JpgFrame)
- parseFrames :: Get [JpgFrame]
- parseFrameKinds :: Get [(JpgFrameKind, Int64, Int64)]
- parseToFirstFrameHeader :: Get (Maybe JpgFrameHeader)

# Documentation

type MutableMacroBlock s a = STVector s a Source #

Macroblock that can be transformed.

createEmptyMutableMacroBlock :: (Storable a, Num a) => ST s (MutableMacroBlock s a) Source #

Create a new macroblock with the good array size

printMacroBlock :: (Storable a, PrintfArg a) => MutableMacroBlock s a -> ST s String Source #

printPureMacroBlock :: (Storable a, PrintfArg a) => MacroBlock a -> String Source #

type DcCoefficient = Int16 Source #

Type only used to make clear what kind of integer we are carrying Might be transformed into newtype in the future

data JpgImage Source #

Constructors

JpgImage |

Fields

- jpgFrame :: [JpgFrame]

#### Instances

Instances details

Binary JpgImage Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgImage -> Put Source # get :: Get JpgImage Source # putList :: [JpgImage] -> Put Source #
NFData JpgImage Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgImage -> () Source #
Generic JpgImage Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgImage |
Instance details Defined in Codec.Picture.Jpg.Internal.Types type Rep JpgImage = D1 ('MetaData "JpgImage" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgImage" 'PrefixI 'True) (S1 ('MetaSel ('Just "jpgFrame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JpgFrame])))

Methods

from :: JpgImage -> Rep JpgImage x Source #

to :: Rep JpgImage x -> JpgImage Source #

Show JpgImage Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgImage -> ShowS Source # show :: JpgImage -> String Source # showList :: [JpgImage] -> ShowS Source #
Eq JpgImage Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgImage -> JpgImage -> Bool Source # (/=) :: JpgImage -> JpgImage -> Bool Source #
type Rep JpgImage Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types type Rep JpgImage = D1 ('MetaData "JpgImage" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgImage" 'PrefixI 'True) (S1 ('MetaSel ('Just "jpgFrame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JpgFrame])))

data JpgComponent Source #

Constructors

JpgComponent |

Fields

- componentIdentifier :: !Word8
- horizontalSamplingFactor :: !Word8

  Stored with 4 bits

- verticalSamplingFactor :: !Word8

  Stored with 4 bits

- quantizationTableDest :: !Word8

#### Instances

Instances details

Binary JpgComponent Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgComponent -> Put Source # get :: Get JpgComponent Source # putList :: [JpgComponent] -> Put Source #
NFData JpgComponent Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgComponent -> () Source #
Generic JpgComponent Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgComponent |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgComponent = D1 ('MetaData "JpgComponent" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgComponent" 'PrefixI 'True) ((S1 ('MetaSel ('Just "componentIdentifier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "horizontalSamplingFactor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :*: (S1 ('MetaSel ('Just "verticalSamplingFactor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "quantizationTableDest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8))))

Methods

from :: JpgComponent -> Rep JpgComponent x Source #

to :: Rep JpgComponent x -> JpgComponent Source #

Show JpgComponent Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgComponent -> ShowS Source # show :: JpgComponent -> String Source # showList :: [JpgComponent] -> ShowS Source #
Eq JpgComponent Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgComponent -> JpgComponent -> Bool Source # (/=) :: JpgComponent -> JpgComponent -> Bool Source #
type Rep JpgComponent Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgComponent = D1 ('MetaData "JpgComponent" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgComponent" 'PrefixI 'True) ((S1 ('MetaSel ('Just "componentIdentifier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "horizontalSamplingFactor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :*: (S1 ('MetaSel ('Just "verticalSamplingFactor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "quantizationTableDest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8))))

data JpgFrameHeader Source #

Constructors

JpgFrameHeader |

Fields

- jpgFrameHeaderLength :: !Word16
- jpgSamplePrecision :: !Word8
- jpgHeight :: !Word16
- jpgWidth :: !Word16
- jpgImageComponentCount :: !Word8
- jpgComponents :: ![JpgComponent]

#### Instances

Instances details

Binary JpgFrameHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgFrameHeader -> Put Source # get :: Get JpgFrameHeader Source # putList :: [JpgFrameHeader] -> Put Source #
NFData JpgFrameHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgFrameHeader -> () Source #
Generic JpgFrameHeader Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgFrameHeader |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrameHeader = D1 ('MetaData "JpgFrameHeader" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgFrameHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jpgFrameHeaderLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "jpgSamplePrecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "jpgHeight") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))) :*: (S1 ('MetaSel ('Just "jpgWidth") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "jpgImageComponentCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "jpgComponents") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [JpgComponent])))))

Methods

from :: JpgFrameHeader -> Rep JpgFrameHeader x Source #

to :: Rep JpgFrameHeader x -> JpgFrameHeader Source #

Show JpgFrameHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgFrameHeader -> ShowS Source # show :: JpgFrameHeader -> String Source # showList :: [JpgFrameHeader] -> ShowS Source #
Eq JpgFrameHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgFrameHeader -> JpgFrameHeader -> Bool Source # (/=) :: JpgFrameHeader -> JpgFrameHeader -> Bool Source #
type Rep JpgFrameHeader Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrameHeader = D1 ('MetaData "JpgFrameHeader" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgFrameHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jpgFrameHeaderLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "jpgSamplePrecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "jpgHeight") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))) :*: (S1 ('MetaSel ('Just "jpgWidth") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "jpgImageComponentCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "jpgComponents") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [JpgComponent])))))

data JpgFrame Source #

Constructors

JpgAppFrame !Word8 ByteString |
JpgAdobeAPP14 !JpgAdobeApp14 |
JpgJFIF !JpgJFIFApp0 |
JpgExif ![ImageFileDirectory] |
JpgExtension !Word8 ByteString |
JpgQuantTable ![JpgQuantTableSpec] |
JpgHuffmanTable ![(JpgHuffmanTableSpec, HuffmanPackedTree)] |
JpgScanBlob !JpgScanHeader !ByteString | The `ByteString` is the ECS (Entropy-Coded Segment), typically the largest part of compressed image data.
JpgScans !JpgFrameKind !JpgFrameHeader |
JpgIntervalRestart !Word16 |

#### Instances

Instances details

NFData JpgFrame Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgFrame -> () Source #
Generic JpgFrame Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgFrame |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrame = D1 ('MetaData "JpgFrame" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (((C1 ('MetaCons "JpgAppFrame" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "JpgAdobeAPP14" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgAdobeApp14))) :+: (C1 ('MetaCons "JpgJFIF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgJFIFApp0)) :+: (C1 ('MetaCons "JpgExif" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ImageFileDirectory])) :+: C1 ('MetaCons "JpgExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))) :+: ((C1 ('MetaCons "JpgQuantTable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [JpgQuantTableSpec])) :+: C1 ('MetaCons "JpgHuffmanTable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(JpgHuffmanTableSpec, HuffmanPackedTree)]))) :+: (C1 ('MetaCons "JpgScanBlob" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgScanHeader) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)) :+: (C1 ('MetaCons "JpgScans" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgFrameKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgFrameHeader)) :+: C1 ('MetaCons "JpgIntervalRestart" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))))))

Methods

from :: JpgFrame -> Rep JpgFrame x Source #

to :: Rep JpgFrame x -> JpgFrame Source #

Show JpgFrame Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgFrame -> ShowS Source # show :: JpgFrame -> String Source # showList :: [JpgFrame] -> ShowS Source #
Eq JpgFrame Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgFrame -> JpgFrame -> Bool Source # (/=) :: JpgFrame -> JpgFrame -> Bool Source #
type Rep JpgFrame Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrame = D1 ('MetaData "JpgFrame" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (((C1 ('MetaCons "JpgAppFrame" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)) :+: C1 ('MetaCons "JpgAdobeAPP14" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgAdobeApp14))) :+: (C1 ('MetaCons "JpgJFIF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgJFIFApp0)) :+: (C1 ('MetaCons "JpgExif" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ImageFileDirectory])) :+: C1 ('MetaCons "JpgExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))) :+: ((C1 ('MetaCons "JpgQuantTable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [JpgQuantTableSpec])) :+: C1 ('MetaCons "JpgHuffmanTable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [(JpgHuffmanTableSpec, HuffmanPackedTree)]))) :+: (C1 ('MetaCons "JpgScanBlob" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgScanHeader) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)) :+: (C1 ('MetaCons "JpgScans" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgFrameKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JpgFrameHeader)) :+: C1 ('MetaCons "JpgIntervalRestart" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16))))))

data JpgFrameKind Source #

Constructors

JpgBaselineDCTHuffman |
JpgExtendedSequentialDCTHuffman |
JpgProgressiveDCTHuffman |
JpgLosslessHuffman |
JpgDifferentialSequentialDCTHuffman |
JpgDifferentialProgressiveDCTHuffman |
JpgDifferentialLosslessHuffman |
JpgExtendedSequentialArithmetic |
JpgProgressiveDCTArithmetic |
JpgLosslessArithmetic |
JpgDifferentialSequentialDCTArithmetic |
JpgDifferentialProgressiveDCTArithmetic |
JpgDifferentialLosslessArithmetic |
JpgQuantizationTable |
JpgHuffmanTableMarker |
JpgStartOfScan |
JpgEndOfImage |
JpgAppSegment Word8 |
JpgExtensionSegment Word8 |
JpgRestartInterval |
JpgRestartIntervalEnd Word8 |

#### Instances

Instances details

Binary JpgFrameKind Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgFrameKind -> Put Source # get :: Get JpgFrameKind Source # putList :: [JpgFrameKind] -> Put Source #
NFData JpgFrameKind Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgFrameKind -> () Source #
Generic JpgFrameKind Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgFrameKind |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrameKind = D1 ('MetaData "JpgFrameKind" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) ((((C1 ('MetaCons "JpgBaselineDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgExtendedSequentialDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgProgressiveDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgLosslessHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialSequentialDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "JpgDifferentialProgressiveDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialLosslessHuffman" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgExtendedSequentialArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgProgressiveDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgLosslessArithmetic" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "JpgDifferentialSequentialDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialProgressiveDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgDifferentialLosslessArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgQuantizationTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgHuffmanTableMarker" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "JpgStartOfScan" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgEndOfImage" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgAppSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))) :+: (C1 ('MetaCons "JpgExtensionSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)) :+: (C1 ('MetaCons "JpgRestartInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgRestartIntervalEnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))))))

Methods

from :: JpgFrameKind -> Rep JpgFrameKind x Source #

to :: Rep JpgFrameKind x -> JpgFrameKind Source #

Show JpgFrameKind Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgFrameKind -> ShowS Source # show :: JpgFrameKind -> String Source # showList :: [JpgFrameKind] -> ShowS Source #
Eq JpgFrameKind Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgFrameKind -> JpgFrameKind -> Bool Source # (/=) :: JpgFrameKind -> JpgFrameKind -> Bool Source #
type Rep JpgFrameKind Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgFrameKind = D1 ('MetaData "JpgFrameKind" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) ((((C1 ('MetaCons "JpgBaselineDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgExtendedSequentialDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgProgressiveDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgLosslessHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialSequentialDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "JpgDifferentialProgressiveDCTHuffman" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialLosslessHuffman" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgExtendedSequentialArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgProgressiveDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgLosslessArithmetic" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "JpgDifferentialSequentialDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgDifferentialProgressiveDCTArithmetic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgDifferentialLosslessArithmetic" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgQuantizationTable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgHuffmanTableMarker" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "JpgStartOfScan" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgEndOfImage" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgAppSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))) :+: (C1 ('MetaCons "JpgExtensionSegment" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)) :+: (C1 ('MetaCons "JpgRestartInterval" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgRestartIntervalEnd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))))))

data JpgScanHeader Source #

Constructors

JpgScanHeader |

Fields

- scanLength :: !Word16
- scanComponentCount :: !Word8
- scans :: [JpgScanSpecification]
- spectralSelection :: (Word8, Word8)

  (begin, end)

- successiveApproxHigh :: !Word8

  Encoded as 4 bits

- successiveApproxLow :: !Word8

  Encoded as 4 bits

#### Instances

Instances details

Binary JpgScanHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgScanHeader -> Put Source # get :: Get JpgScanHeader Source # putList :: [JpgScanHeader] -> Put Source #
NFData JpgScanHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgScanHeader -> () Source #
Generic JpgScanHeader Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgScanHeader |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgScanHeader = D1 ('MetaData "JpgScanHeader" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgScanHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scanLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "scanComponentCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "scans") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JpgScanSpecification]))) :*: (S1 ('MetaSel ('Just "spectralSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Word8, Word8)) :*: (S1 ('MetaSel ('Just "successiveApproxHigh") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "successiveApproxLow") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)))))

Methods

from :: JpgScanHeader -> Rep JpgScanHeader x Source #

to :: Rep JpgScanHeader x -> JpgScanHeader Source #

Show JpgScanHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgScanHeader -> ShowS Source # show :: JpgScanHeader -> String Source # showList :: [JpgScanHeader] -> ShowS Source #
Eq JpgScanHeader Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgScanHeader -> JpgScanHeader -> Bool Source # (/=) :: JpgScanHeader -> JpgScanHeader -> Bool Source #
type Rep JpgScanHeader Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgScanHeader = D1 ('MetaData "JpgScanHeader" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgScanHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scanLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: (S1 ('MetaSel ('Just "scanComponentCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "scans") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JpgScanSpecification]))) :*: (S1 ('MetaSel ('Just "spectralSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Word8, Word8)) :*: (S1 ('MetaSel ('Just "successiveApproxHigh") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "successiveApproxLow") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)))))

data JpgQuantTableSpec Source #

Constructors

JpgQuantTableSpec |

Fields

- quantPrecision :: !Word8

  Stored on 4 bits

- quantDestination :: !Word8

  Stored on 4 bits

- quantTable :: MacroBlock Int16

#### Instances

Instances details

Binary JpgQuantTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgQuantTableSpec -> Put Source # get :: Get JpgQuantTableSpec Source # putList :: [JpgQuantTableSpec] -> Put Source #
NFData JpgQuantTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgQuantTableSpec -> () Source #
Generic JpgQuantTableSpec Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgQuantTableSpec |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgQuantTableSpec = D1 ('MetaData "JpgQuantTableSpec" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgQuantTableSpec" 'PrefixI 'True) (S1 ('MetaSel ('Just "quantPrecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Just "quantDestination") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "quantTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MacroBlock Int16)))))

Methods

from :: JpgQuantTableSpec -> Rep JpgQuantTableSpec x Source #

to :: Rep JpgQuantTableSpec x -> JpgQuantTableSpec Source #

Show JpgQuantTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgQuantTableSpec -> ShowS Source # show :: JpgQuantTableSpec -> String Source # showList :: [JpgQuantTableSpec] -> ShowS Source #
Eq JpgQuantTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgQuantTableSpec -> JpgQuantTableSpec -> Bool Source # (/=) :: JpgQuantTableSpec -> JpgQuantTableSpec -> Bool Source #
type Rep JpgQuantTableSpec Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgQuantTableSpec = D1 ('MetaData "JpgQuantTableSpec" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgQuantTableSpec" 'PrefixI 'True) (S1 ('MetaSel ('Just "quantPrecision") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Just "quantDestination") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "quantTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MacroBlock Int16)))))

data JpgHuffmanTableSpec Source #

Constructors

JpgHuffmanTableSpec |

Fields

- huffmanTableClass :: !DctComponent

  0 : DC, 1 : AC, stored on 4 bits

- huffmanTableDest :: !Word8

  Stored on 4 bits

- huffSizes :: !(Vector Word8)
- huffCodes :: !(Vector (Vector Word8))

#### Instances

Instances details

Binary JpgHuffmanTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgHuffmanTableSpec -> Put Source # get :: Get JpgHuffmanTableSpec Source # putList :: [JpgHuffmanTableSpec] -> Put Source #
NFData JpgHuffmanTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgHuffmanTableSpec -> () Source #
Generic JpgHuffmanTableSpec Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgHuffmanTableSpec |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgHuffmanTableSpec = D1 ('MetaData "JpgHuffmanTableSpec" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgHuffmanTableSpec" 'PrefixI 'True) ((S1 ('MetaSel ('Just "huffmanTableClass") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DctComponent) :*: S1 ('MetaSel ('Just "huffmanTableDest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :*: (S1 ('MetaSel ('Just "huffSizes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector Word8)) :*: S1 ('MetaSel ('Just "huffCodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector (Vector Word8))))))

Methods

from :: JpgHuffmanTableSpec -> Rep JpgHuffmanTableSpec x Source #

to :: Rep JpgHuffmanTableSpec x -> JpgHuffmanTableSpec Source #

Show JpgHuffmanTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgHuffmanTableSpec -> ShowS Source # show :: JpgHuffmanTableSpec -> String Source # showList :: [JpgHuffmanTableSpec] -> ShowS Source #
Eq JpgHuffmanTableSpec Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgHuffmanTableSpec -> JpgHuffmanTableSpec -> Bool Source # (/=) :: JpgHuffmanTableSpec -> JpgHuffmanTableSpec -> Bool Source #
type Rep JpgHuffmanTableSpec Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgHuffmanTableSpec = D1 ('MetaData "JpgHuffmanTableSpec" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgHuffmanTableSpec" 'PrefixI 'True) ((S1 ('MetaSel ('Just "huffmanTableClass") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DctComponent) :*: S1 ('MetaSel ('Just "huffmanTableDest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8)) :*: (S1 ('MetaSel ('Just "huffSizes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector Word8)) :*: S1 ('MetaSel ('Just "huffCodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Vector (Vector Word8))))))

data JpgImageKind Source #

Constructors

BaseLineDCT |
ProgressiveDCT |

data JpgScanSpecification Source #

Constructors

JpgScanSpecification |

Fields

- componentSelector :: !Word8
- dcEntropyCodingTable :: !Word8

  Encoded as 4 bits

- acEntropyCodingTable :: !Word8

  Encoded as 4 bits

#### Instances

Instances details

Binary JpgScanSpecification Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgScanSpecification -> Put Source # get :: Get JpgScanSpecification Source # putList :: [JpgScanSpecification] -> Put Source #
NFData JpgScanSpecification Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgScanSpecification -> () Source #
Generic JpgScanSpecification Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgScanSpecification |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgScanSpecification = D1 ('MetaData "JpgScanSpecification" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgScanSpecification" 'PrefixI 'True) (S1 ('MetaSel ('Just "componentSelector") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Just "dcEntropyCodingTable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "acEntropyCodingTable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8))))

Methods

from :: JpgScanSpecification -> Rep JpgScanSpecification x Source #

to :: Rep JpgScanSpecification x -> JpgScanSpecification Source #

Show JpgScanSpecification Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgScanSpecification -> ShowS Source # show :: JpgScanSpecification -> String Source # showList :: [JpgScanSpecification] -> ShowS Source #
Eq JpgScanSpecification Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgScanSpecification -> JpgScanSpecification -> Bool Source # (/=) :: JpgScanSpecification -> JpgScanSpecification -> Bool Source #
type Rep JpgScanSpecification Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgScanSpecification = D1 ('MetaData "JpgScanSpecification" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgScanSpecification" 'PrefixI 'True) (S1 ('MetaSel ('Just "componentSelector") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: (S1 ('MetaSel ('Just "dcEntropyCodingTable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "acEntropyCodingTable") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8))))

data JpgColorSpace Source #

Constructors

JpgColorSpaceYCbCr |
JpgColorSpaceYCC |
JpgColorSpaceY |
JpgColorSpaceYA |
JpgColorSpaceYCCA |
JpgColorSpaceYCCK |
JpgColorSpaceCMYK |
JpgColorSpaceRGB |
JpgColorSpaceRGBA |

#### Instances

Instances details

NFData JpgColorSpace Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgColorSpace -> () Source #
Generic JpgColorSpace Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgColorSpace |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgColorSpace = D1 ('MetaData "JpgColorSpace" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (((C1 ('MetaCons "JpgColorSpaceYCbCr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYCC" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgColorSpaceY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYA" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "JpgColorSpaceYCCA" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYCCK" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgColorSpaceCMYK" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgColorSpaceRGB" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceRGBA" 'PrefixI 'False) (U1 :: Type -> Type)))))

Methods

from :: JpgColorSpace -> Rep JpgColorSpace x Source #

to :: Rep JpgColorSpace x -> JpgColorSpace Source #

Show JpgColorSpace Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgColorSpace -> ShowS Source # show :: JpgColorSpace -> String Source # showList :: [JpgColorSpace] -> ShowS Source #
Eq JpgColorSpace Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgColorSpace -> JpgColorSpace -> Bool Source # (/=) :: JpgColorSpace -> JpgColorSpace -> Bool Source #
type Rep JpgColorSpace Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgColorSpace = D1 ('MetaData "JpgColorSpace" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (((C1 ('MetaCons "JpgColorSpaceYCbCr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYCC" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgColorSpaceY" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYA" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "JpgColorSpaceYCCA" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceYCCK" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "JpgColorSpaceCMYK" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JpgColorSpaceRGB" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JpgColorSpaceRGBA" 'PrefixI 'False) (U1 :: Type -> Type)))))

data AdobeTransform Source #

Constructors

AdobeUnknown | Value 0
AdobeYCbCr | value 1
AdobeYCck | value 2

#### Instances

Instances details

Binary AdobeTransform Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: AdobeTransform -> Put Source # get :: Get AdobeTransform Source # putList :: [AdobeTransform] -> Put Source #
NFData AdobeTransform Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: AdobeTransform -> () Source #
Generic AdobeTransform Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep AdobeTransform |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep AdobeTransform = D1 ('MetaData "AdobeTransform" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "AdobeUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AdobeYCbCr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AdobeYCck" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: AdobeTransform -> Rep AdobeTransform x Source #

to :: Rep AdobeTransform x -> AdobeTransform Source #

Show AdobeTransform Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> AdobeTransform -> ShowS Source # show :: AdobeTransform -> String Source # showList :: [AdobeTransform] -> ShowS Source #
Eq AdobeTransform Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: AdobeTransform -> AdobeTransform -> Bool Source # (/=) :: AdobeTransform -> AdobeTransform -> Bool Source #
type Rep AdobeTransform Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep AdobeTransform = D1 ('MetaData "AdobeTransform" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "AdobeUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AdobeYCbCr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AdobeYCck" 'PrefixI 'False) (U1 :: Type -> Type)))

data JpgAdobeApp14 Source #

Constructors

JpgAdobeApp14 |

Fields

- _adobeDctVersion :: !Word16
- _adobeFlag0 :: !Word16
- _adobeFlag1 :: !Word16
- _adobeTransform :: !AdobeTransform

#### Instances

Instances details

Binary JpgAdobeApp14 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgAdobeApp14 -> Put Source # get :: Get JpgAdobeApp14 Source # putList :: [JpgAdobeApp14] -> Put Source #
NFData JpgAdobeApp14 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgAdobeApp14 -> () Source #
Generic JpgAdobeApp14 Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgAdobeApp14 |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgAdobeApp14 = D1 ('MetaData "JpgAdobeApp14" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgAdobeApp14" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_adobeDctVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_adobeFlag0") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "_adobeFlag1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_adobeTransform") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AdobeTransform))))

Methods

from :: JpgAdobeApp14 -> Rep JpgAdobeApp14 x Source #

to :: Rep JpgAdobeApp14 x -> JpgAdobeApp14 Source #

Show JpgAdobeApp14 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgAdobeApp14 -> ShowS Source # show :: JpgAdobeApp14 -> String Source # showList :: [JpgAdobeApp14] -> ShowS Source #
Eq JpgAdobeApp14 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgAdobeApp14 -> JpgAdobeApp14 -> Bool Source # (/=) :: JpgAdobeApp14 -> JpgAdobeApp14 -> Bool Source #
type Rep JpgAdobeApp14 Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgAdobeApp14 = D1 ('MetaData "JpgAdobeApp14" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgAdobeApp14" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_adobeDctVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_adobeFlag0") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "_adobeFlag1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_adobeTransform") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AdobeTransform))))

data JpgJFIFApp0 Source #

Constructors

JpgJFIFApp0 |

Fields

- _jfifUnit :: !JFifUnit
- _jfifDpiX :: !Word16
- _jfifDpiY :: !Word16
- _jfifThumbnail :: !(Maybe Int)

#### Instances

Instances details

Binary JpgJFIFApp0 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JpgJFIFApp0 -> Put Source # get :: Get JpgJFIFApp0 Source # putList :: [JpgJFIFApp0] -> Put Source #
NFData JpgJFIFApp0 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JpgJFIFApp0 -> () Source #
Generic JpgJFIFApp0 Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JpgJFIFApp0 |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgJFIFApp0 = D1 ('MetaData "JpgJFIFApp0" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgJFIFApp0" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_jfifUnit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JFifUnit) :*: S1 ('MetaSel ('Just "_jfifDpiX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "_jfifDpiY") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_jfifThumbnail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)))))

Methods

from :: JpgJFIFApp0 -> Rep JpgJFIFApp0 x Source #

to :: Rep JpgJFIFApp0 x -> JpgJFIFApp0 Source #

Show JpgJFIFApp0 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JpgJFIFApp0 -> ShowS Source # show :: JpgJFIFApp0 -> String Source # showList :: [JpgJFIFApp0] -> ShowS Source #
Eq JpgJFIFApp0 Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JpgJFIFApp0 -> JpgJFIFApp0 -> Bool Source # (/=) :: JpgJFIFApp0 -> JpgJFIFApp0 -> Bool Source #
type Rep JpgJFIFApp0 Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JpgJFIFApp0 = D1 ('MetaData "JpgJFIFApp0" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JpgJFIFApp0" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_jfifUnit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 JFifUnit) :*: S1 ('MetaSel ('Just "_jfifDpiX") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16)) :*: (S1 ('MetaSel ('Just "_jfifDpiY") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word16) :*: S1 ('MetaSel ('Just "_jfifThumbnail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Int)))))

data JFifUnit Source #

Size: 1

Constructors

JFifUnitUnknown | 0
JFifPixelsPerInch | 1
JFifPixelsPerCentimeter | 2

#### Instances

Instances details

Binary JFifUnit Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: JFifUnit -> Put Source # get :: Get JFifUnit Source # putList :: [JFifUnit] -> Put Source #
NFData JFifUnit Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods rnf :: JFifUnit -> () Source #
Generic JFifUnit Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

Associated Types

type Rep JFifUnit |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JFifUnit = D1 ('MetaData "JFifUnit" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JFifUnitUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JFifPixelsPerInch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JFifPixelsPerCentimeter" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: JFifUnit -> Rep JFifUnit x Source #

to :: Rep JFifUnit x -> JFifUnit Source #

Show JFifUnit Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods showsPrec :: Int -> JFifUnit -> ShowS Source # show :: JFifUnit -> String Source # showList :: [JFifUnit] -> ShowS Source #
Eq JFifUnit Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods (==) :: JFifUnit -> JFifUnit -> Bool Source # (/=) :: JFifUnit -> JFifUnit -> Bool Source #
type Rep JFifUnit Source # |

Instance details

Defined in Codec.Picture.Jpg.Internal.Types

type Rep JFifUnit = D1 ('MetaData "JFifUnit" "Codec.Picture.Jpg.Internal.Types" "JuicyPixels-3.3.9-JOEyjv2MitKLIatxgnp9xi" 'False) (C1 ('MetaCons "JFifUnitUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JFifPixelsPerInch" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JFifPixelsPerCentimeter" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype TableList a Source #

Type introduced only to avoid some typeclass overlapping problem

Constructors

TableList [a] |

#### Instances

Instances details

(SizeCalculable a, Binary a) => Binary (TableList a) Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: TableList a -> Put Source # get :: Get (TableList a) Source # putList :: [TableList a] -> Put Source #

newtype RestartInterval Source #

Constructors

RestartInterval Word16 |

#### Instances

Instances details

Binary RestartInterval Source # |
Instance details Defined in Codec.Picture.Jpg.Internal.Types Methods put :: RestartInterval -> Put Source # get :: Get RestartInterval Source # putList :: [RestartInterval] -> Put Source #

getJpgImage :: Get JpgImage Source #

Like `get` from `instance Binary JpgImage`, but without the legacy semi-lazy implementation.

calculateSize :: SizeCalculable a => a -> Int Source #

dctBlockSize :: Num a => a Source #

parseECS :: Get ByteString Source #

Parses a Scan's ECS (Entropy-Coded Segment, the largest part of compressed image data) from the `Get` stream.

When this function is called, the parser's offset should be immediately behind the SOS tag.

As described on e.g. https://www.ccoderun.ca/programming/2017-01-31_jpeg/,

    To find the next segment after the SOS, you must keep reading until you
    find a 0xFF bytes which is not immediately followed by 0x00 (see "byte stuffing")
    [or a reset marker's byte: 0xD0 through 0xD7].
    Normally, this will be the EOI segment that comes at the end of the file.

where the 0xFF is the next segment's marker. See https://github.com/corkami/formats/blob/master/image/jpeg.md#entropy-coded-segment for more details.

This function returns the ECS, not including the next segment's marker on its trailing end.

parseECS_simple :: Get ByteString Source #

Simpler implementation of `parseECS` to allow an easier understanding of the logic, and to provide a comparison for correctness.

skipUntilFrames :: Get () Source #

skipFrameMarker :: Get () Source #

parseFrameOfKind :: JpgFrameKind -> Get (Maybe JpgFrame) Source #

Parses a single frame.

Returns `Nothing` when we encounter a frame we want to skip.

parseFrames :: Get [JpgFrame] Source #

Parse a list of `JpgFrame`s.

parseFrameKinds :: Get [(JpgFrameKind, Int64, Int64)] Source #

Parse a list of `JpgFrameKind`s with their corresponding offsets and lengths (not counting the segment and frame markers into the lengths).

Useful for debugging.

parseToFirstFrameHeader :: Get (Maybe JpgFrameHeader) Source #

Parses forward, returning the first scan header encountered.

Should be used after `skipUntilFrames`.

Fails parsing when an SOS segment marker (`JpgStartOfScan`, resulting in `JpgScanBlob`) is encountered before an SOF segment marker (that results in `JpgScans` carrying the `JpgFrameHeader`).