massiv-io-0.2.1.0: Import/export of Image files into massiv Arrays

Copyright(c) Alexey Kuleshevich 2018-2020
LicenseBSD3
MaintainerAlexey Kuleshevich <lehins@yandex.ru>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Massiv.Array.IO

Contents

Description

 
Synopsis

Supported Image Formats

type Image r cs e = Array r Ix2 (Pixel cs e) Source #

Encoding and decoding of images is done using JuicyPixels and netpbm packages.

List of image formats that are currently supported, and their exact ColorModels with precision for reading and writing without any conversion:

Reading

readArray Source #

Arguments

:: (Readable f arr, MonadIO m) 
=> f

File format that should be used while decoding the file

-> FilePath

Path to the file

-> m arr 

Read an array from one of the supported Readable file formats.

For example readImage assumes all images to be in sRGB color space, but if you know that the image is actually encoded in some other color space, for example AdobeRGB, then you can read it in manually into a matching color model and then cast into a color space you know it is encoded in:

>>> import qualified Graphics.ColorModel as CM
>>> frogRGB <- readArray JPG "files/_frog.jpg" :: IO (Image S CM.RGB Word8)
>>> let frogAdobeRGB = (fromImageBaseModel frogRGB :: Image S AdobeRGB Word8)

Since: 0.1.0

readArrayWithMetadata Source #

Arguments

:: (Readable f arr, MonadIO m) 
=> f

File format that should be used while decoding the file

-> FilePath

Path to the file

-> m (arr, Metadata f) 

Read an array from one of the supported file formats. Some formats are capable of preducing format specific metadata.

Since: 0.2.0

readImage Source #

Arguments

:: (ColorModel cs e, MonadIO m) 
=> FilePath

File path for an image

-> m (Image S cs e) 

Tries to guess an image format from file's extension, then attempts to decode it as such. It also assumes an image is encoded in sRGB color space or its alternate representation. In order to supply the format manually or choose a different color space, eg. AdobeRGB, use readArray instead. Color space and precision of the result image must match exactly that of the actual image.

May throw ConvertError, DecodeError and other standard errors related to file IO.

Resulting image will be read as specified by the type signature:

>>> frog <- readImage "files/frog.jpg" :: IO (Image S (YCbCr SRGB) Word8)
>>> size frog
Sz (200 :. 320)
>>> displayImage frog

In case when the result image type does not match the color space or precision of the actual image file, ConvertError will be thrown.

>>> frog <- readImage "files/frog.jpg" :: IO (Image S SRGB Word8)
*** Exception: ConvertError "Cannot decode JPG image <Image S YCbCr Word8> as <Image S SRGB Word8>"

Whenever image is not in the color space or precision that we need, either use readImageAuto or manually convert to the desired one by using the appropriate conversion functions:

>>> frogYCbCr <- readImage "files/frog.jpg" :: IO (Image S (YCbCr SRGB) Word8)
>>> let frogSRGB = convertImage frogYCbCr :: Image D SRGB Word8

A simpler approach to achieve the same effect would be to use readImageAuto:

>>> frogSRGB' <- readImageAuto "files/frog.jpg" :: IO (Image S SRGB Word8)
>>> compute frogSRGB == frogSRGB'
True

Since: 0.1.0

readImageAuto Source #

Arguments

:: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadIO m) 
=> FilePath

File path for an image

-> m (Image r cs e) 

Similar to readImage, but will perform all necessary color space conversion and precision adjustment in order to match the result image type. Very useful whenever image format isn't known ahead of time.

>>> frogCMYK <- readImageAuto "files/frog.jpg" :: IO (Image S (CMYK SRGB) Double)
>>> size frogCMYK
Sz (200 :. 320)

Since: 0.1.0

Writing

writeArray Source #

Arguments

:: (Writable f arr, MonadIO m) 
=> f

Format to use while encoding the array

-> WriteOptions f

Any file format related encoding options. Use def for default.

-> FilePath 
-> arr 
-> m () 

Write an array to disk.

>>> frogYCbCr <- readImage "files/frog.jpg" :: IO (Image S (YCbCr SRGB) Word8)
>>> frogAdobeRGB = convertImage frogYCbCr :: Image D AdobeRGB Word8
>>> writeArray JPG def "files/_frog.jpg" $ toImageBaseModel $ computeAs S frogAdobeRGB

Note - On UNIX operating systems writing will happen with guarantees of atomicity and durability, see withBinaryFileDurableAtomic.

Since: 0.2.0

writeImage :: (Source r Ix2 (Pixel cs e), ColorModel cs e, MonadIO m) => FilePath -> Image r cs e -> m () Source #

This function will guess an output file format from the file extension and will write to file any image with the color model that is supported by that format. In case that automatic precision adjustment or colors space conversion is also desired, writeImageAuto can be used instead.

Can throw ConvertError, EncodeError and other usual IO errors.

Note - On UNIX operating systems writing will happen with guarantees of atomicity and durability, see withBinaryFileDurableAtomic.

Since: 0.1.0

writeImageAuto :: (Source r Ix2 (Pixel cs e), ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, MonadIO m) => FilePath -> Image r cs e -> m () Source #

Write an image encoded in sRGB color space into a file while performing all necessary precision and color space conversions. If a file supports color model that the image is on then it will be encoded as such. For example writing a TIF file in CMYK color model, 8bit precision and an sRGB color space:

>>> frogYCbCr <- readImage "files/frog.jpg" :: IO (Image S (YCbCr SRGB) Word8)
>>> writeImageAuto "files/frog.tiff" (convertImage frogYCbCr :: Image D (CMYK AdobeRGB) Word8)

Regardless that the color space supplied was AdobeRGB auto conversion will ensure it is stored as SRGB, except in CMYK color model, since TIF file format supports it.

Since: 0.1.0

Displaying

data ExternalViewer Source #

External viewing application to use for displaying images.

Constructors

ExternalViewer FilePath [String] Int

Any custom viewer, which can be specified:

  • FilePath - to the actual viewer executable.
  • [String] - command line arguments that will be passed to the executable.
  • Int - position index in the above list where FilePath to an image should be injected

displayImage :: (Writable (Auto TIF) (Image r cs e), MonadIO m) => Image r cs e -> m () Source #

Writes an image to a temporary file and makes a call to an external viewer that is set as a default image viewer by the OS. This is a non-blocking function call, so it might take some time before an image will appear.

Note - This function should only be used in ghci, otherwise use displayImage defaultViewer True

Since: 0.1.0

displayImageUsing Source #

Arguments

:: (Writable (Auto TIF) (Image r cs e), MonadIO m) 
=> ExternalViewer

Image viewer program

-> Bool

Should this function block the current thread until viewer is closed. Supplying False is only safe in the ghci session.

-> Image r cs e

Image to display

-> m () 

An image is written as a .tiff file into an operating system's temporary directory and passed as an argument to the external viewer program.

Since: 0.1.0

displayImageFile :: MonadIO m => ExternalViewer -> FilePath -> m () Source #

Displays an image file by calling an external image viewer. It will block until the external viewer is closed.

Since: 0.1.0

Common viewers

defaultViewer :: ExternalViewer Source #

Default viewer is inferred from the operating system.

Since: 0.1.0

eogViewer :: ExternalViewer Source #

eog /tmp/massiv/img.tiff

Eye of GNOME

gpicviewViewer :: ExternalViewer Source #

gpicview /tmp/massiv/img.tiff

GPicView

fehViewer :: ExternalViewer Source #

feh --fullscreen --auto-zoom /tmp/massiv/img.tiff

FEH

gimpViewer :: ExternalViewer Source #

gimp /tmp/massiv/img.tiff

GIMP

Supported Image Formats

JuicyPixels formats

BMP

data BMP Source #

Bitmap image with .bmp extension.

Constructors

BMP 
Instances
Show BMP Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Methods

showsPrec :: Int -> BMP -> ShowS #

show :: BMP -> String #

showList :: [BMP] -> ShowS #

FileFormat BMP Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Associated Types

type WriteOptions BMP :: Type Source #

type Metadata BMP :: Type Source #

Writable BMP (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Methods

encodeM :: MonadThrow m => Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

type WriteOptions BMP Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

type Metadata BMP Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

decodeBMP :: (ColorModel cs e, MonadThrow m) => BMP -> ByteString -> m (Image S cs e) Source #

Decode a Bitmap Image

decodeWithMetadataBMP :: (ColorModel cs e, MonadThrow m) => BMP -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Bitmap Image

decodeAutoBMP :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto BMP -> ByteString -> m (Image r cs e) Source #

Decode a Bitmap Image

decodeAutoWithMetadataBMP :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto BMP -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Bitmap Image

encodeBMP :: forall cs e m. (ColorModel cs e, MonadThrow m) => BMP -> BitmapOptions -> Image S cs e -> m ByteString Source #

encodeAutoBMP :: forall r cs i e. (ColorSpace (BaseSpace cs) i e, ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto BMP -> BitmapOptions -> Image r cs e -> ByteString Source #

GIF

data GIF Source #

Graphics Interchange Format image with .gif extension.

Constructors

GIF 
Instances
Show GIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Methods

showsPrec :: Int -> GIF -> ShowS #

show :: GIF -> String #

showList :: [GIF] -> ShowS #

FileFormat GIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Associated Types

type WriteOptions GIF :: Type Source #

type Metadata GIF :: Type Source #

Writable GIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

FileFormat (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Associated Types

type WriteOptions (Sequence GIF) :: Type Source #

type Metadata (Sequence GIF) :: Type Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Writable (Auto (Sequence GIF)) (NonEmpty (GifDelay, Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y' Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Y D65) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence GIF)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha SRGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha RGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Methods

encodeM :: MonadThrow m => Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type WriteOptions GIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type Metadata GIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type WriteOptions (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type Metadata (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

data SequenceGifOptions Source #

Constructors

SequenceGifOptions 

Fields

type GifDelay = Int #

Delay to wait before showing the next Gif image. The delay is expressed in 100th of seconds.

data GifLooping #

Help to control the behaviour of GIF animation looping.

Constructors

LoopingNever

The animation will stop once the end is reached

LoopingForever

The animation will restart once the end is reached

LoopingRepeat Word16

The animation will repeat n times before stoping

data PaletteOptions #

To specify how the palette will be created.

Constructors

PaletteOptions 

Fields

data PaletteCreationMethod #

Define which palette creation method is used.

Constructors

MedianMeanCut

MedianMeanCut method, provide the best results (visualy) at the cost of increased calculations.

Uniform

Very fast algorithm (one pass), doesn't provide good looking results.

decodeGIF :: (ColorModel cs e, MonadThrow m) => GIF -> ByteString -> m (Image S cs e) Source #

Decode a Gif Image

decodeWithMetadataGIF :: (ColorModel cs e, MonadThrow m) => GIF -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Gif Image

decodeAutoGIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto GIF -> ByteString -> m (Image r cs e) Source #

Decode a Gif Image

decodeAutoWithMetadataGIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto GIF -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Gif Image

encodeGIF :: forall cs e m. (ColorModel cs e, MonadThrow m) => GIF -> GifOptions -> Image S cs e -> m ByteString Source #

encodeAutoGIF :: forall r cs i e m. (ColorSpace cs i e, Source r Ix2 (Pixel cs e), MonadThrow m) => Auto GIF -> GifOptions -> Image r cs e -> m ByteString Source #

decodeSequenceGIF :: (ColorModel cs e, MonadThrow m) => Sequence GIF -> ByteString -> m [Image S cs e] Source #

Decode a sequence of Gif images

decodeSequenceWithMetadataGIF :: (ColorModel cs e, MonadThrow m) => Sequence GIF -> ByteString -> m ([Image S cs e], [GifDelay]) Source #

Decode a sequence of Gif images

decodeAutoSequenceGIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto (Sequence GIF) -> ByteString -> m [Image r cs e] Source #

Decode a sequence of Gif images

decodeAutoSequenceWithMetadataGIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto (Sequence GIF) -> ByteString -> m ([Image r cs e], [GifDelay]) Source #

Decode a sequence of Gif images

HDR

data HDR Source #

High-dynamic-range image with .hdr or .pic extension.

Constructors

HDR 
Instances
Show HDR Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Methods

showsPrec :: Int -> HDR -> ShowS #

show :: HDR -> String #

showList :: [HDR] -> ShowS #

FileFormat HDR Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Associated Types

type WriteOptions HDR :: Type Source #

type Metadata HDR :: Type Source #

Writable HDR (Image S SRGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Writable HDR (Image S RGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Readable HDR (Image S SRGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Readable HDR (Image S RGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Methods

encodeM :: MonadThrow m => Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

type WriteOptions HDR Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

type Metadata HDR Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

newtype HdrOptions Source #

Constructors

HdrOptions 

Fields

decodeHDR :: (ColorModel cs e, MonadThrow m) => HDR -> ByteString -> m (Image S cs e) Source #

Decode a HDR Image

decodeWithMetadataHDR :: (ColorModel cs e, MonadThrow m) => HDR -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a HDR Image

decodeAutoHDR :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto HDR -> ByteString -> m (Image r cs e) Source #

Decode a HDR Image

decodeAutoWithMetadataHDR :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto HDR -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a HDR Image

encodeHDR :: forall cs e m. (ColorModel cs e, MonadThrow m) => HDR -> HdrOptions -> Image S cs e -> m ByteString Source #

encodeAutoHDR :: forall r cs i e. (ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto HDR -> HdrOptions -> Image r cs e -> ByteString Source #

JPG

data JPG Source #

Joint Photographic Experts Group image with .jpg or .jpeg extension.

Constructors

JPG 
Instances
Show JPG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Methods

showsPrec :: Int -> JPG -> ShowS #

show :: JPG -> String #

showList :: [JPG] -> ShowS #

FileFormat JPG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Associated Types

type WriteOptions JPG :: Type Source #

type Metadata JPG :: Type Source #

Writable JPG (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Methods

encodeM :: MonadThrow m => Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

type WriteOptions JPG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

type Metadata JPG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

decodeJPG :: (ColorModel cs e, MonadThrow m) => JPG -> ByteString -> m (Image S cs e) Source #

Decode a Jpeg Image

decodeWithMetadataJPG :: (ColorModel cs e, MonadThrow m) => JPG -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Jpeg Image

decodeAutoJPG :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto JPG -> ByteString -> m (Image r cs e) Source #

Decode a Jpeg Image

decodeAutoWithMetadataJPG :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto JPG -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Jpeg Image

encodeJPG :: forall cs e m. (ColorModel cs e, MonadThrow m) => JPG -> JpegOptions -> Image S cs e -> m ByteString Source #

encodeAutoJPG :: forall r cs i e. (ColorSpace (BaseSpace cs) i e, ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto JPG -> JpegOptions -> Image r cs e -> ByteString Source #

PNG

data PNG Source #

Portable Network Graphics image with .png extension.

Constructors

PNG 
Instances
Show PNG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Methods

showsPrec :: Int -> PNG -> ShowS #

show :: PNG -> String #

showList :: [PNG] -> ShowS #

FileFormat PNG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Associated Types

type WriteOptions PNG :: Type Source #

type Metadata PNG :: Type Source #

Writable PNG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Methods

encodeM :: MonadThrow m => Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

type WriteOptions PNG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

type WriteOptions PNG = ()
type Metadata PNG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

decodePNG :: (ColorModel cs e, MonadThrow m) => PNG -> ByteString -> m (Image S cs e) Source #

Decode a Png Image

decodeWithMetadataPNG :: (ColorModel cs e, MonadThrow m) => PNG -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Png Image

decodeAutoPNG :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto PNG -> ByteString -> m (Image r cs e) Source #

Decode a Png Image

decodeAutoWithMetadataPNG :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto PNG -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Png Image

encodePNG :: forall cs e m. (ColorModel cs e, MonadThrow m) => PNG -> Image S cs e -> m ByteString Source #

encodeAutoPNG :: forall r cs i e. (ColorSpace (BaseSpace cs) i e, ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto PNG -> Image r cs e -> ByteString Source #

TGA

data TGA Source #

Truevision Graphics Adapter image with .tga extension.

Constructors

TGA 
Instances
Show TGA Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Methods

showsPrec :: Int -> TGA -> ShowS #

show :: TGA -> String #

showList :: [TGA] -> ShowS #

FileFormat TGA Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Associated Types

type WriteOptions TGA :: Type Source #

type Metadata TGA :: Type Source #

Writable TGA (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Methods

encodeM :: MonadThrow m => Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

type WriteOptions TGA Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

type WriteOptions TGA = ()
type Metadata TGA Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

decodeTGA :: (ColorModel cs e, MonadThrow m) => TGA -> ByteString -> m (Image S cs e) Source #

Decode a Tga Image

decodeWithMetadataTGA :: (ColorModel cs e, MonadThrow m) => TGA -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Tga Image

decodeAutoTGA :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto TGA -> ByteString -> m (Image r cs e) Source #

Decode a Tga Image

decodeAutoWithMetadataTGA :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto TGA -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Tga Image

encodeTGA :: forall cs e m. (ColorModel cs e, MonadThrow m) => TGA -> Image S cs e -> m ByteString Source #

encodeAutoTGA :: forall r cs i e. (ColorSpace (BaseSpace cs) i e, ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto TGA -> Image r cs e -> ByteString Source #

TIF

data TIF Source #

Tagged Image File Format image with .tif or .tiff extension.

Constructors

TIF 
Instances
Show TIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Methods

showsPrec :: Int -> TIF -> ShowS #

show :: TIF -> String #

showList :: [TIF] -> ShowS #

FileFormat TIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Associated Types

type WriteOptions TIF :: Type Source #

type Metadata TIF :: Type Source #

Writable TIF (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (CMYK SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S CMYK Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (CMYK SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S CMYK Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Methods

encodeM :: MonadThrow m => Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

type WriteOptions TIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

type WriteOptions TIF = ()
type Metadata TIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

decodeTIF :: (ColorModel cs e, MonadThrow m) => TIF -> ByteString -> m (Image S cs e) Source #

Decode a Tiff Image

decodeWithMetadataTIF :: (ColorModel cs e, MonadThrow m) => TIF -> ByteString -> m (Image S cs e, Metadatas) Source #

Decode a Tiff Image

decodeAutoTIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto TIF -> ByteString -> m (Image r cs e) Source #

Decode a Tiff Image

decodeAutoWithMetadataTIF :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => Auto TIF -> ByteString -> m (Image r cs e, Metadatas) Source #

Decode a Tiff Image

encodeTIF :: forall cs e m. (ColorModel cs e, MonadThrow m) => TIF -> Image S cs e -> m ByteString Source #

encodeAutoTIF :: forall r cs i e. (ColorSpace (BaseSpace cs) i e, ColorSpace cs i e, Source r Ix2 (Pixel cs e)) => Auto TIF -> Image r cs e -> ByteString Source #

JuicyPixels conversion

fromDynamicImage :: forall cs e. ColorModel cs e => DynamicImage -> Maybe (Image S cs e) Source #

Deprecated: In favor of fromDynamicImageM

fromDynamicImageM :: forall cs e m. (ColorModel cs e, MonadThrow m) => DynamicImage -> m (Maybe (Image S cs e)) Source #

fromDynamicImageAuto :: forall r cs i e m. (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e, MonadThrow m) => DynamicImage -> m (Image r cs e) Source #

Netpbm formats

PBM

data PBM Source #

Netpbm: portable bitmap image with .pbm extension.

Constructors

PBM 
Instances
Show PBM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

showsPrec :: Int -> PBM -> ShowS #

show :: PBM -> String #

showList :: [PBM] -> ShowS #

FileFormat PBM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PBM :: Type Source #

type Metadata PBM :: Type Source #

Readable PBM (Image S (Y D65) Bit) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PBM (Image S Y Bit) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

FileFormat (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PBM) :: Type Source #

type Metadata (Sequence PBM) :: Type Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PBM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S (Y D65) Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S Y Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PBM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PBM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PBM = ()
type Metadata PBM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

PGM

data PGM Source #

Netpbm: portable graymap image with .pgm extension.

Constructors

PGM 
Instances
Show PGM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

showsPrec :: Int -> PGM -> ShowS #

show :: PGM -> String #

showList :: [PGM] -> ShowS #

FileFormat PGM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PGM :: Type Source #

type Metadata PGM :: Type Source #

Readable PGM (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

FileFormat (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PGM) :: Type Source #

type Metadata (Sequence PGM) :: Type Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PGM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PGM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PGM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PGM = ()
type Metadata PGM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

PPM

data PPM Source #

Netpbm: portable pixmap image with .ppm extension.

Constructors

PPM 
Instances
Show PPM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Methods

showsPrec :: Int -> PPM -> ShowS #

show :: PPM -> String #

showList :: [PPM] -> ShowS #

FileFormat PPM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PPM :: Type Source #

type Metadata PPM :: Type Source #

Readable PPM (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

FileFormat (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PPM) :: Type Source #

type Metadata (Sequence PPM) :: Type Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PPM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S SRGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PPM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PPM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions PPM = ()
type Metadata PPM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

decodeNetpbmImage :: (FileFormat f, ColorModel cs e, MonadThrow m) => f -> ByteString -> m (Image S cs e, Maybe ByteString) Source #

Try to decode a Netpbm image

Since: 0.2.0

decodeNetpbmImageSequence :: (FileFormat (Sequence f), ColorModel cs e, MonadThrow m) => Sequence f -> ByteString -> m ([Image S cs e], Maybe ByteString) Source #

Try to decode a Netpbm image sequence

Since: 0.2.0

decodeAutoNetpbmImage :: (FileFormat f, Mutable r Ix2 (Pixel cs e), MonadThrow m, ColorSpace cs i e) => f -> ByteString -> m (Image r cs e, Maybe ByteString) Source #

Try to decode a Netpbm image, while auto converting the colorspace.

Since: 0.2.0

decodeAutoNetpbmImageSequence :: (FileFormat (Sequence f), Mutable r Ix2 (Pixel cs e), MonadThrow m, ColorSpace cs i e) => Auto (Sequence f) -> ByteString -> m ([Image r cs e], Maybe ByteString) Source #

Try to decode a Netpbm image sequence, while auto converting the colorspace.

Since: 0.2.0

Helper image functions

data Encode out Source #

Instances
Show (Encode out) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

showsPrec :: Int -> Encode out -> ShowS #

show :: Encode out -> String #

showList :: [Encode out] -> ShowS #

FileFormat (Encode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type WriteOptions (Encode (Image r cs e)) :: Type Source #

type Metadata (Encode (Image r cs e)) :: Type Source #

Methods

ext :: Encode (Image r cs e) -> String Source #

exts :: Encode (Image r cs e) -> [String] Source #

isFormat :: String -> Encode (Image r cs e) -> Bool Source #

Writable (Encode (Image r cs e)) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

encodeM :: MonadThrow m => Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> m ByteString Source #

type WriteOptions (Encode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

type WriteOptions (Encode (Image r cs e)) = ()
type Metadata (Encode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

type Metadata (Encode (Image r cs e)) = ()

encodeImageM Source #

Arguments

:: MonadThrow m 
=> [Encode (Image r cs e)]

List of image formats to choose from (useful lists are imageWriteFormats and imageWriteAutoFormats)

-> FilePath

File name with extension, so the format can be inferred

-> Image r cs e

Image to encode

-> m ByteString 

Encode an image into a lazy ByteString, while selecting the appropriate format from the file extension.

Since: 0.2.0

imageWriteFormats :: (Source r Ix2 (Pixel cs e), ColorModel cs e) => [Encode (Image r cs e)] Source #

List of image formats that can be encoded without any color space conversion.

imageWriteAutoFormats :: (Source r Ix2 (Pixel cs e), ColorSpace cs i e, ColorSpace (BaseSpace cs) i e) => [Encode (Image r cs e)] Source #

List of image formats that can be encoded with any necessary color space conversions.

data Decode out Source #

Instances
Show (Decode out) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

showsPrec :: Int -> Decode out -> ShowS #

show :: Decode out -> String #

showList :: [Decode out] -> ShowS #

FileFormat (Decode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type WriteOptions (Decode (Image r cs e)) :: Type Source #

type Metadata (Decode (Image r cs e)) :: Type Source #

Methods

ext :: Decode (Image r cs e) -> String Source #

exts :: Decode (Image r cs e) -> [String] Source #

isFormat :: String -> Decode (Image r cs e) -> Bool Source #

Readable (Decode (Image r cs e)) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

decodeM :: MonadThrow m => Decode (Image r cs e) -> ByteString -> m (Image r cs e) Source #

decodeWithMetadataM :: MonadThrow m => Decode (Image r cs e) -> ByteString -> m (Image r cs e, Metadata (Decode (Image r cs e))) Source #

type WriteOptions (Decode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

type WriteOptions (Decode (Image r cs e)) = ()
type Metadata (Decode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

type Metadata (Decode (Image r cs e)) = ()

decodeImageM Source #

Arguments

:: MonadThrow m 
=> [Decode (Image r cs e)]

List of available formats to choose from

-> FilePath

File name with extension, so format can be inferred

-> ByteString

Encoded image

-> m (Image r cs e) 

Decode an image from the strict ByteString while inferring format the image is encoded in from the file extension

Since: 0.2.0

imageReadFormats :: ColorModel cs e => [Decode (Image S cs e)] Source #

List of image formats decodable with no color space conversion

imageReadAutoFormats :: (Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => [Decode (Image r cs e)] Source #

List of image formats decodable with automatic colorspace conversion

All other common reading/writing components

class Monad m => MonadThrow (m :: Type -> Type) where #

A class for monads in which exceptions may be thrown.

Instances should obey the following law:

throwM e >> x = throwM e

In other words, throwing an exception short-circuits the rest of the monadic computation.

Methods

throwM :: Exception e => e -> m a #

Throw an exception. Note that this throws when this action is run in the monad m, not when it is applied. It is a generalization of Control.Exception's throwIO.

Should satisfy the law:

throwM e >> f = throwM e
Instances
MonadThrow [] 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> [a] #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Maybe a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IO a #

MonadThrow Q 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Q a #

MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> STM a #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> Either e a #

MonadThrow (ST s) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ST s a #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> MaybeT m a #

MonadThrow m => MonadThrow (ListT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ListT m a #

MonadThrow m => MonadThrow (ExceptT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> ExceptT e m a #

MonadThrow m => MonadThrow (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IdentityT m a #

(Error e, MonadThrow m) => MonadThrow (ErrorT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> ErrorT e m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

MonadThrow m => MonadThrow (StateT s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

(MonadThrow m, Monoid w) => MonadThrow (WriterT w m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

MonadThrow m => MonadThrow (ContT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ContT r m a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ReaderT r m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

(MonadThrow m, Monoid w) => MonadThrow (RWST r w s m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

class FileFormat f => Writable f arr where Source #

Arrays that can be written into a file.

Methods

encodeM :: MonadThrow m => f -> WriteOptions f -> arr -> m ByteString Source #

Encode an array into a ByteString.

Since: 0.2.0

Instances
Writable BMP (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable BMP (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Writable GIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable GIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable HDR (Image S SRGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Writable HDR (Image S RGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Writable JPG (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable JPG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Writable PNG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable PNG (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Writable TGA (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TGA (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Writable TIF (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y' Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (CMYK SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Y D65) Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S Y Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S CMYK Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Writable TIF (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Writable (Auto (Sequence GIF)) (NonEmpty (GifDelay, Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y' Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Y D65) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Methods

encodeM :: MonadThrow m => Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Methods

encodeM :: MonadThrow m => Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Methods

encodeM :: MonadThrow m => Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Methods

encodeM :: MonadThrow m => Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Methods

encodeM :: MonadThrow m => Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Methods

encodeM :: MonadThrow m => Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Methods

encodeM :: MonadThrow m => Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> m ByteString Source #

Writable (Encode (Image r cs e)) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

encodeM :: MonadThrow m => Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> m ByteString Source #

class FileFormat f => Readable f arr where Source #

File formats that can be read into arrays.

Minimal complete definition

(decodeM | decodeWithMetadataM)

Methods

decodeM :: MonadThrow m => f -> ByteString -> m arr Source #

Decode a ByteString into an array. Can also return whatever left over data that was not consumed during decoding.

Since: 0.2.0

decodeWithMetadataM :: MonadThrow m => f -> ByteString -> m (arr, Metadata f) Source #

Just as decodeM, but also return any format type specific metadata

Since: 0.2.0

decodeWithMetadataM :: (Metadata f ~ (), MonadThrow m) => f -> ByteString -> m (arr, Metadata f) Source #

Just as decodeM, but also return any format type specific metadata

Since: 0.2.0

Instances
Readable BMP (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable BMP (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Readable GIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable GIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable HDR (Image S SRGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Readable HDR (Image S RGB Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Readable JPG (Image S (YCbCr SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S YCbCr Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable JPG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Readable PNG (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable PNG (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Readable TGA (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TGA (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Readable TIF (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y' Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (CMYK SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (CMYK SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Y D65) Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Float) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S Y Word32) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S CMYK Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S CMYK Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha SRGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha SRGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y') Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y') Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha (Y D65)) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha (Y D65)) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha Y) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha RGB) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable TIF (Image S (Alpha RGB) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Readable PPM (Image S SRGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S SRGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S RGB Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PPM (Image S RGB Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y' Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y' Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S (Y D65) Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S (Y D65) Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y Word8) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PGM (Image S Y Word16) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PBM (Image S (Y D65) Bit) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable PBM (Image S Y Bit) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence GIF)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PPM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PGM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PBM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence GIF) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha SRGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha RGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence PPM) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S SRGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S (Y D65) Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S Y Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PPM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PGM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PBM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Decode (Image r cs e)) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Methods

decodeM :: MonadThrow m => Decode (Image r cs e) -> ByteString -> m (Image r cs e) Source #

decodeWithMetadataM :: MonadThrow m => Decode (Image r cs e) -> ByteString -> m (Image r cs e, Metadata (Decode (Image r cs e))) Source #

class (Default (WriteOptions f), Show f) => FileFormat f where Source #

File format. Helps in guessing file format from a file extension, as well as supplying format specific options during saving the file.

Minimal complete definition

ext

Associated Types

type WriteOptions f Source #

Options that can be used during writing a file in this format.

type Metadata f Source #

Methods

ext :: f -> String Source #

Default file extension for this file format.

exts :: f -> [String] Source #

Other known file extensions for this file format, eg. ".jpeg", ".jpg".

isFormat :: String -> f -> Bool Source #

Checks if a file extension corresponds to the format, eg. isFormat ".png" PNG == True

Instances
FileFormat BMP Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Associated Types

type WriteOptions BMP :: Type Source #

type Metadata BMP :: Type Source #

FileFormat GIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Associated Types

type WriteOptions GIF :: Type Source #

type Metadata GIF :: Type Source #

FileFormat HDR Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Associated Types

type WriteOptions HDR :: Type Source #

type Metadata HDR :: Type Source #

FileFormat JPG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Associated Types

type WriteOptions JPG :: Type Source #

type Metadata JPG :: Type Source #

FileFormat PNG Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Associated Types

type WriteOptions PNG :: Type Source #

type Metadata PNG :: Type Source #

FileFormat TGA Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Associated Types

type WriteOptions TGA :: Type Source #

type Metadata TGA :: Type Source #

FileFormat TIF Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Associated Types

type WriteOptions TIF :: Type Source #

type Metadata TIF :: Type Source #

FileFormat PPM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PPM :: Type Source #

type Metadata PPM :: Type Source #

FileFormat PGM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PGM :: Type Source #

type Metadata PGM :: Type Source #

FileFormat PBM Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions PBM :: Type Source #

type Metadata PBM :: Type Source #

FileFormat f => FileFormat (Auto f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

Associated Types

type WriteOptions (Auto f) :: Type Source #

type Metadata (Auto f) :: Type Source #

Methods

ext :: Auto f -> String Source #

exts :: Auto f -> [String] Source #

isFormat :: String -> Auto f -> Bool Source #

FileFormat (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Associated Types

type WriteOptions (Sequence GIF) :: Type Source #

type Metadata (Sequence GIF) :: Type Source #

FileFormat (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PPM) :: Type Source #

type Metadata (Sequence PPM) :: Type Source #

FileFormat (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PGM) :: Type Source #

type Metadata (Sequence PGM) :: Type Source #

FileFormat (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PBM) :: Type Source #

type Metadata (Sequence PBM) :: Type Source #

FileFormat (Decode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type WriteOptions (Decode (Image r cs e)) :: Type Source #

type Metadata (Decode (Image r cs e)) :: Type Source #

Methods

ext :: Decode (Image r cs e) -> String Source #

exts :: Decode (Image r cs e) -> [String] Source #

isFormat :: String -> Decode (Image r cs e) -> Bool Source #

FileFormat (Encode (Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image

Associated Types

type WriteOptions (Encode (Image r cs e)) :: Type Source #

type Metadata (Encode (Image r cs e)) :: Type Source #

Methods

ext :: Encode (Image r cs e) -> String Source #

exts :: Encode (Image r cs e) -> [String] Source #

isFormat :: String -> Encode (Image r cs e) -> Bool Source #

newtype Auto f Source #

Constructors

Auto f 
Instances
Show f => Show (Auto f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

Methods

showsPrec :: Int -> Auto f -> ShowS #

show :: Auto f -> String #

showList :: [Auto f] -> ShowS #

FileFormat f => FileFormat (Auto f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

Associated Types

type WriteOptions (Auto f) :: Type Source #

type Metadata (Auto f) :: Type Source #

Methods

ext :: Auto f -> String Source #

exts :: Auto f -> [String] Source #

isFormat :: String -> Auto f -> Bool Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Writable (Auto (Sequence GIF)) (NonEmpty (GifDelay, Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence GIF)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PPM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PGM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PBM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

Methods

encodeM :: MonadThrow m => Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Methods

encodeM :: MonadThrow m => Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

Methods

encodeM :: MonadThrow m => Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

Methods

encodeM :: MonadThrow m => Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

Methods

encodeM :: MonadThrow m => Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

Methods

encodeM :: MonadThrow m => Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> m ByteString Source #

(ColorSpace cs i e, ColorSpace (BaseSpace cs) i e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

Methods

encodeM :: MonadThrow m => Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> m ByteString Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto BMP) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.BMP

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto GIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto HDR) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.HDR

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto JPG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.JPG

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PNG) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.PNG

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TGA) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TGA

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto TIF) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.TIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PPM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PGM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto PBM) (Image r cs e) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Auto f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

type Metadata (Auto f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

type Metadata (Auto f) = Metadata f

newtype Sequence f Source #

Special wrapper for formats that support encoding/decoding sequence of array.

Constructors

Sequence f 
Instances
Show f => Show (Sequence f) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Base

Methods

showsPrec :: Int -> Sequence f -> ShowS #

show :: Sequence f -> String #

showList :: [Sequence f] -> ShowS #

FileFormat (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Associated Types

type WriteOptions (Sequence GIF) :: Type Source #

type Metadata (Sequence GIF) :: Type Source #

FileFormat (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PPM) :: Type Source #

type Metadata (Sequence PPM) :: Type Source #

FileFormat (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PGM) :: Type Source #

type Metadata (Sequence PGM) :: Type Source #

FileFormat (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Associated Types

type WriteOptions (Sequence PBM) :: Type Source #

type Metadata (Sequence PBM) :: Type Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Writable (Auto (Sequence GIF)) (NonEmpty (GifDelay, Image r cs e)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y' Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Y D65) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S Y Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S SRGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S RGB Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha SRGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Writable (Sequence GIF) (NonEmpty (GifDelay, GifDisposalMethod, Image S (Alpha RGB) Word8)) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence GIF)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PPM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PGM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

(Mutable r Ix2 (Pixel cs e), ColorSpace cs i e) => Readable (Auto (Sequence PBM)) [Image r cs e] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence GIF) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha SRGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence GIF) [Image S (Alpha RGB) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

Readable (Sequence PPM) [Image S SRGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S SRGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PPM) [Image S RGB Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y' Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S (Y D65) Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word8] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PGM) [Image S Y Word16] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S (Y D65) Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

Readable (Sequence PBM) [Image S Y Bit] Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type WriteOptions (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type WriteOptions (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence GIF) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.JuicyPixels.GIF

type Metadata (Sequence PPM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence PGM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

type Metadata (Sequence PBM) Source # 
Instance details

Defined in Data.Massiv.Array.IO.Image.Netpbm

newtype EncodeError Source #

This exception can be thrown while writing/encoding into a file and indicates an error in an array that is being encoded.

Constructors

EncodeError String 

newtype DecodeError Source #

This exception can be thrown while reading/decoding a file and indicates an error in the file itself.

Constructors

DecodeError String 

newtype ConvertError Source #

Conversion error, which is thrown when there is a mismatch between the expected array type and the one supported by the file format. It is also thrown upon a failure of automatic conversion between those types, in case such conversion is utilized.

Constructors

ConvertError String 

defaultWriteOptions :: FileFormat f => f -> WriteOptions f Source #

Generate default write options for a file format

encode' :: Writable f arr => f -> WriteOptions f -> arr -> ByteString Source #

Encode an array into a ByteString.

decode' :: Readable f arr => f -> ByteString -> arr Source #

Decode a ByteString into an Array.

toProxy :: a -> Proxy a Source #

Helper function to create a Proxy from the value.

fromMaybeEncode :: forall f r cs e b m. (ColorModel cs e, FileFormat f, Typeable r, MonadThrow m) => f -> Proxy (Image r cs e) -> Maybe b -> m b Source #

Encode an image using the supplied function or throw an error in case of failure.

fromMaybeDecode :: forall r cs e a f m. (ColorModel cs e, FileFormat f, Typeable r, MonadThrow m) => f -> (a -> String) -> (a -> Maybe (Image r cs e)) -> a -> m (Image r cs e) Source #

Decode an image using the supplied function or throw an error in case of failure.

convertEither :: forall r cs i e a f m. (ColorSpace cs i e, FileFormat f, Typeable r, MonadThrow m) => f -> (a -> String) -> (a -> Maybe (Image r cs e)) -> a -> m (Image r cs e) Source #

Convert an image using the supplied function and return ConvertError error in case of failure.

convertImage :: (Source r' Ix2 (Pixel cs' e'), ColorSpace cs' i' e', ColorSpace cs i e) => Image r' cs' e' -> Image D cs e Source #

Convert image to any supported color space

Since: 0.2.0

toImageBaseModel :: Array S Ix2 (Pixel cs e) -> Array S Ix2 (Pixel (BaseModel cs) e) Source #

Cast an array. This is theoretically unsafe operation, but for all currently available ColorSpace instances this function is perfectly safe.

Since: 0.2.0

fromImageBaseModel :: Array S Ix2 (Pixel (BaseModel cs) e) -> Array S Ix2 (Pixel cs e) Source #

Cast an array. This is theoretically unsafe operation, but for all currently available ColorSpace instances this function is perfectly safe.

Since: 0.2.0

demoteLumaImage :: Array S Ix2 (Pixel Y' e) -> Array S Ix2 (Pixel Y e) Source #

Cast an array with Luma pixels to an array with pixels in a plain single channel Color color model

Since: 0.2.1

promoteLumaImage :: Array S Ix2 (Pixel Y e) -> Array S Ix2 (Pixel Y' e) Source #

Cast an array with pixels in a plain single channel Color color model to an array with Luma pixels

Since: 0.2.1

demoteLumaAlphaImage :: Array S Ix2 (Pixel (Alpha Y') e) -> Array S Ix2 (Pixel (Alpha Y) e) Source #

Same as demoteLumaImage, but with Alpha channel

Since: 0.2.1

promoteLumaAlphaImage :: Array S Ix2 (Pixel (Alpha Y) e) -> Array S Ix2 (Pixel (Alpha Y') e) Source #

Same as promoteLumaImage but with Alpha channel

Since: 0.2.1