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

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

Data.Massiv.Array.IO

Contents

Description

 

Synopsis

Reading

readArray Source #

Arguments

:: Readable f arr 
=> f

File format that should be used while decoding the file

-> ReadOptions f

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

-> FilePath

Path to the file

-> IO arr 

Read an array from one of the supported file formats.

readImage Source #

Arguments

:: (Source S Ix2 (Pixel cs e), ColorSpace cs e) 
=> FilePath

File path for an image

-> IO (Image S cs e) 

Try to guess an image format from file's extension, then attempt to decode it as such. In order to supply the format manually and thus avoid this guessing technique, use readArray instead. Color space and precision of the result array must match exactly that of the actual image, in order to apply auto conversion use readImageAuto instead.

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

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

>>> frog <- readImage "files/frog.jpg" :: IO (Image S YCbCr Word8)
>>> 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 CMYK Word8)
>>> displayImage frog
*** Exception: ConvertError "Cannot decode JPG image <Image S YCbCr Word8> as <Image S CMYK 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:

>>> frogCMYK <- readImageAuto "files/frog.jpg" :: IO (Image S CMYK Double)
>>> displayImage frogCMYK

readImageAuto Source #

Arguments

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

File path for an image

-> IO (Image r cs e) 

Same as readImage, but will perform any possible color space and precision conversions in order to match the result image type. Very useful whenever image format isn't known at compile time.

Writing

writeArray Source #

Arguments

:: Writable f arr 
=> f

Format to use while encoding the array

-> WriteOptions f

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

-> FilePath 
-> arr 
-> IO () 

writeImage :: (Source r Ix2 (Pixel cs e), ColorSpace cs e) => FilePath -> Image r cs e -> IO () Source #

Inverse of the readImage, but similarly to it, will guess an output file format from the file extension and will write to file any image with the colorspace that is supported by that format. Precision of the image might be adjusted using Elevator if precision of the source array is not supported by the image file format. For instance, @r@ 'RGBA' 'Double' being saved as PNG file would be written as @r@ 'RGBA' 'Word16', thus using highest supported precision Word16 for that format. If automatic colors space is also desired, writeImageAuto can be used instead.

Can throw ConvertError, EncodeError and other usual IO errors.

writeImageAuto :: (Source r Ix2 (Pixel cs e), ColorSpace cs e, ToYA cs e, ToRGBA cs e, ToYCbCr cs e, ToCMYK cs e) => FilePath -> Image r cs e -> IO () Source #

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) => Image r cs e -> IO () Source #

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.

displayImageUsing Source #

Arguments

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

Image viewer program

-> Bool

Should a call block the cuurrent thread untul viewer is closed.

-> Image r cs e 
-> IO () 

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. displayImageUsing :: Writable (Auto TIF) (Image r cs e) => ExternalViewer -- ^ Image viewer program -> Bool -- ^ Should a call block the cuurrent thread untul viewer is closed. -> Image r cs e -> IO ()

displayImageFile :: ExternalViewer -> FilePath -> IO () Source #

Displays an image file by calling an external image viewer.

Common viewers

defaultViewer :: ExternalViewer Source #

Default viewer is inferred from the operating system.

gpicviewViewer :: ExternalViewer Source #

gpicview /tmp/hip/img.tiff

GPicView

fehViewer :: ExternalViewer Source #

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

FEH

gimpViewer :: ExternalViewer Source #

gimp /tmp/hip/img.tiff

GIMP

Supported Image Formats

class (Default (ReadOptions f), 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 ReadOptions f Source #

Options that can be used during reading a file in this format.

type WriteOptions f Source #

Options that can be used during writing a file in this format.

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 TIF Source # 

Associated Types

type ReadOptions TIF :: * Source #

type WriteOptions TIF :: * Source #

FileFormat TGA Source # 

Associated Types

type ReadOptions TGA :: * Source #

type WriteOptions TGA :: * Source #

FileFormat JPG Source # 

Associated Types

type ReadOptions JPG :: * Source #

type WriteOptions JPG :: * Source #

FileFormat HDR Source # 

Associated Types

type ReadOptions HDR :: * Source #

type WriteOptions HDR :: * Source #

FileFormat GIF Source # 

Associated Types

type ReadOptions GIF :: * Source #

type WriteOptions GIF :: * Source #

FileFormat PNG Source # 

Associated Types

type ReadOptions PNG :: * Source #

type WriteOptions PNG :: * Source #

FileFormat BMP Source # 

Associated Types

type ReadOptions BMP :: * Source #

type WriteOptions BMP :: * Source #

FileFormat PPM Source # 

Associated Types

type ReadOptions PPM :: * Source #

type WriteOptions PPM :: * Source #

FileFormat PGM Source # 

Associated Types

type ReadOptions PGM :: * Source #

type WriteOptions PGM :: * Source #

FileFormat PBM Source # 

Associated Types

type ReadOptions PBM :: * Source #

type WriteOptions PBM :: * Source #

FileFormat f => FileFormat (Auto f) Source # 

Associated Types

type ReadOptions (Auto f) :: * Source #

type WriteOptions (Auto f) :: * Source #

Methods

ext :: Auto f -> String Source #

exts :: Auto f -> [String] Source #

isFormat :: String -> Auto f -> Bool Source #

FileFormat (Sequence (Auto GIF)) Source # 
FileFormat (Sequence (Auto PPM)) Source # 
FileFormat (Sequence (Auto PGM)) Source # 
FileFormat (Sequence (Auto PBM)) Source # 
FileFormat (Sequence GIF) Source # 
FileFormat (Sequence PPM) Source # 
FileFormat (Sequence PGM) Source # 
FileFormat (Sequence PBM) Source # 
FileFormat (Decode (Image r cs e)) Source # 

Associated Types

type ReadOptions (Decode (Image r cs e)) :: * Source #

type WriteOptions (Decode (Image r cs e)) :: * 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 # 

Associated Types

type ReadOptions (Encode (Image r cs e)) :: * Source #

type WriteOptions (Encode (Image r cs e)) :: * 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 #

class Readable f arr where Source #

File formats that can be read into an Array.

Minimal complete definition

decode

Methods

decode :: f -> ReadOptions f -> ByteString -> arr Source #

Decode a ByteString into an Array.

Instances

ColorSpace cs e => Readable TIF (Image S cs e) Source # 

Methods

decode :: TIF -> ReadOptions TIF -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable TGA (Image S cs e) Source # 

Methods

decode :: TGA -> ReadOptions TGA -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable JPG (Image S cs e) Source # 

Methods

decode :: JPG -> ReadOptions JPG -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable HDR (Image S cs e) Source # 

Methods

decode :: HDR -> ReadOptions HDR -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable GIF (Image S cs e) Source # 

Methods

decode :: GIF -> ReadOptions GIF -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PNG (Image S cs e) Source # 

Methods

decode :: PNG -> ReadOptions PNG -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable BMP (Image S cs e) Source # 

Methods

decode :: BMP -> ReadOptions BMP -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PPM (Image S cs e) Source # 

Methods

decode :: PPM -> ReadOptions PPM -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PGM (Image S cs e) Source # 

Methods

decode :: PGM -> ReadOptions PGM -> ByteString -> Image S cs e Source #

ColorSpace cs e => Readable PBM (Image S cs e) Source # 

Methods

decode :: PBM -> ReadOptions PBM -> ByteString -> Image S cs e Source #

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

Methods

decode :: Auto TIF -> ReadOptions (Auto TIF) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto TGA -> ReadOptions (Auto TGA) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto JPG -> ReadOptions (Auto JPG) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto HDR -> ReadOptions (Auto HDR) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto GIF -> ReadOptions (Auto GIF) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PNG -> ReadOptions (Auto PNG) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto BMP -> ReadOptions (Auto BMP) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PPM -> ReadOptions (Auto PPM) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PGM -> ReadOptions (Auto PGM) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PBM -> ReadOptions (Auto PBM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) Source # 
Readable (Decode (Image r cs e)) (Image r cs e) Source # 

Methods

decode :: Decode (Image r cs e) -> ReadOptions (Decode (Image r cs e)) -> ByteString -> Image r cs e Source #

class Writable f arr where Source #

Arrays that can be written into a file.

Minimal complete definition

encode

Methods

encode :: f -> WriteOptions f -> arr -> ByteString Source #

Encode an array into a ByteString.

Instances

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TIF (Image r cs e) Source # 

Methods

encode :: TIF -> WriteOptions TIF -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TGA (Image r cs e) Source # 

Methods

encode :: TGA -> WriteOptions TGA -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable JPG (Image r cs e) Source # 

Methods

encode :: JPG -> WriteOptions JPG -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable HDR (Image r cs e) Source # 

Methods

encode :: HDR -> WriteOptions HDR -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable GIF (Image r cs e) Source # 

Methods

encode :: GIF -> WriteOptions GIF -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable PNG (Image r cs e) Source # 

Methods

encode :: PNG -> WriteOptions PNG -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable BMP (Image r cs e) Source # 

Methods

encode :: BMP -> WriteOptions BMP -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 

Methods

encode :: Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 

Methods

encode :: Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYCbCr cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 

Methods

encode :: Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 

Methods

encode :: Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToY cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 

Methods

encode :: Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYA cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 

Methods

encode :: Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 

Methods

encode :: Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) Source # 
Writable (Encode (Image r cs e)) (Image r cs e) Source # 

Methods

encode :: Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> ByteString Source #

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 

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 Sequence f Source #

Special wrapper for formats that support encoding/decoding sequence of array.

Constructors

Sequence f 

Instances

Show f => Show (Sequence f) Source # 

Methods

showsPrec :: Int -> Sequence f -> ShowS #

show :: Sequence f -> String #

showList :: [Sequence f] -> ShowS #

FileFormat (Sequence (Auto GIF)) Source # 
FileFormat (Sequence (Auto PPM)) Source # 
FileFormat (Sequence (Auto PGM)) Source # 
FileFormat (Sequence (Auto PBM)) Source # 
FileFormat (Sequence GIF) Source # 
FileFormat (Sequence PPM) Source # 
FileFormat (Sequence PGM) Source # 
FileFormat (Sequence PBM) Source # 
(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) Source # 
type ReadOptions (Sequence (Auto GIF)) Source # 
type ReadOptions (Sequence (Auto PPM)) Source # 
type ReadOptions (Sequence (Auto PGM)) Source # 
type ReadOptions (Sequence (Auto PBM)) Source # 
type ReadOptions (Sequence GIF) Source # 
type ReadOptions (Sequence PPM) Source # 
type ReadOptions (Sequence PGM) Source # 
type ReadOptions (Sequence PBM) Source # 
type WriteOptions (Sequence (Auto GIF)) Source # 
type WriteOptions (Sequence (Auto PPM)) Source # 
type WriteOptions (Sequence (Auto PGM)) Source # 
type WriteOptions (Sequence (Auto PBM)) Source # 
type WriteOptions (Sequence GIF) Source # 
type WriteOptions (Sequence PPM) Source # 
type WriteOptions (Sequence PGM) Source # 
type WriteOptions (Sequence PBM) Source # 

newtype Auto f Source #

Constructors

Auto f 

Instances

Show f => Show (Auto f) Source # 

Methods

showsPrec :: Int -> Auto f -> ShowS #

show :: Auto f -> String #

showList :: [Auto f] -> ShowS #

FileFormat f => FileFormat (Auto f) Source # 

Associated Types

type ReadOptions (Auto f) :: * Source #

type WriteOptions (Auto f) :: * Source #

Methods

ext :: Auto f -> String Source #

exts :: Auto f -> [String] Source #

isFormat :: String -> Auto f -> Bool Source #

FileFormat (Sequence (Auto GIF)) Source # 
FileFormat (Sequence (Auto PPM)) Source # 
FileFormat (Sequence (Auto PGM)) Source # 
FileFormat (Sequence (Auto PBM)) Source # 
(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 

Methods

encode :: Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 

Methods

encode :: Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYCbCr cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 

Methods

encode :: Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 

Methods

encode :: Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToY cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 

Methods

encode :: Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToYA cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 

Methods

encode :: Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 

Methods

encode :: Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto TIF -> ReadOptions (Auto TIF) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto TGA -> ReadOptions (Auto TGA) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto JPG -> ReadOptions (Auto JPG) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto HDR -> ReadOptions (Auto HDR) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto GIF -> ReadOptions (Auto GIF) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PNG -> ReadOptions (Auto PNG) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto BMP -> ReadOptions (Auto BMP) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PPM -> ReadOptions (Auto PPM) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PGM -> ReadOptions (Auto PGM) -> ByteString -> Image r cs e Source #

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

Methods

decode :: Auto PBM -> ReadOptions (Auto PBM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) Source # 
type ReadOptions (Auto f) Source # 
type ReadOptions (Sequence (Auto GIF)) Source # 
type ReadOptions (Sequence (Auto PPM)) Source # 
type ReadOptions (Sequence (Auto PGM)) Source # 
type ReadOptions (Sequence (Auto PBM)) Source # 
type WriteOptions (Auto f) Source # 
type WriteOptions (Sequence (Auto GIF)) Source # 
type WriteOptions (Sequence (Auto PPM)) Source # 
type WriteOptions (Sequence (Auto PGM)) Source # 
type WriteOptions (Sequence (Auto PBM)) Source # 

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

defaultReadOptions :: FileFormat f => f -> ReadOptions f Source #

Generate default read options for a file format

defaultWriteOptions :: FileFormat f => f -> WriteOptions f Source #

Generate default write options for a file format

toProxy :: a -> Proxy a Source #

Helper function to create a Proxy from the value.

fromMaybeEncode :: forall f r cs e b. (ColorSpace cs e, FileFormat f, Typeable r) => f -> Proxy (Image r cs e) -> Maybe b -> b Source #

Encode an image using the supplied function or throw an error in case of failure.

fromEitherDecode :: forall r cs e a f. (ColorSpace cs e, FileFormat f, Typeable r) => f -> (a -> String) -> (a -> Maybe (Image r cs e)) -> Either String a -> Image r cs e Source #

Decode an image using the supplied function or throw an error in case of failure.

convertEither :: forall r cs e a f. (ColorSpace cs e, FileFormat f, Typeable r) => f -> (a -> String) -> (a -> Maybe (Image r cs e)) -> a -> Either ConvertError (Image r cs e) Source #

Convert an image using the supplied function and return ConvertError error in case of failure.

data Encode out Source #

Instances

Show (Encode out) Source # 

Methods

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

show :: Encode out -> String #

showList :: [Encode out] -> ShowS #

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

Associated Types

type ReadOptions (Encode (Image r cs e)) :: * Source #

type WriteOptions (Encode (Image r cs e)) :: * 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 # 

Methods

encode :: Encode (Image r cs e) -> WriteOptions (Encode (Image r cs e)) -> Image r cs e -> ByteString Source #

type ReadOptions (Encode (Image r cs e)) Source # 
type ReadOptions (Encode (Image r cs e)) = ()
type WriteOptions (Encode (Image r cs e)) Source # 
type WriteOptions (Encode (Image r cs e)) = ()

encodeImage :: (Source r Ix2 (Pixel cs e), ColorSpace cs e) => [Encode (Image r cs e)] -> FilePath -> Image r cs e -> ByteString Source #

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

imageWriteAutoFormats :: (Source r Ix2 (Pixel cs e), ColorSpace cs e, ToYA cs e, ToRGBA cs e, ToYCbCr cs e, ToCMYK cs e) => [Encode (Image r cs e)] Source #

data Decode out Source #

Instances

Show (Decode out) Source # 

Methods

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

show :: Decode out -> String #

showList :: [Decode out] -> ShowS #

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

Associated Types

type ReadOptions (Decode (Image r cs e)) :: * Source #

type WriteOptions (Decode (Image r cs e)) :: * 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 # 

Methods

decode :: Decode (Image r cs e) -> ReadOptions (Decode (Image r cs e)) -> ByteString -> Image r cs e Source #

type ReadOptions (Decode (Image r cs e)) Source # 
type ReadOptions (Decode (Image r cs e)) = ()
type WriteOptions (Decode (Image r cs e)) Source # 
type WriteOptions (Decode (Image r cs e)) = ()

decodeImage :: (Source r Ix2 (Pixel cs e), ColorSpace cs e) => [Decode (Image r cs e)] -> FilePath -> ByteString -> Image r cs e Source #

imageReadFormats :: (Source S Ix2 (Pixel cs e), ColorSpace cs e) => [Decode (Image S cs e)] Source #

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

JuicyPixels formats

BMP

data BMP Source #

Bitmap image with .bmp extension.

Constructors

BMP 

Instances

Show BMP Source # 

Methods

showsPrec :: Int -> BMP -> ShowS #

show :: BMP -> String #

showList :: [BMP] -> ShowS #

FileFormat BMP Source # 

Associated Types

type ReadOptions BMP :: * Source #

type WriteOptions BMP :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable BMP (Image r cs e) Source # 

Methods

encode :: BMP -> WriteOptions BMP -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable BMP (Image S cs e) Source # 

Methods

decode :: BMP -> ReadOptions BMP -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto BMP) (Image r cs e) Source # 

Methods

encode :: Auto BMP -> WriteOptions (Auto BMP) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto BMP -> ReadOptions (Auto BMP) -> ByteString -> Image r cs e Source #

type ReadOptions BMP Source # 
type ReadOptions BMP = ()
type WriteOptions BMP Source # 
type WriteOptions BMP = ()

GIF

data GIF Source #

Graphics Interchange Format image with .gif extension.

Constructors

GIF 

Instances

Show GIF Source # 

Methods

showsPrec :: Int -> GIF -> ShowS #

show :: GIF -> String #

showList :: [GIF] -> ShowS #

FileFormat GIF Source # 

Associated Types

type ReadOptions GIF :: * Source #

type WriteOptions GIF :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable GIF (Image r cs e) Source # 

Methods

encode :: GIF -> WriteOptions GIF -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable GIF (Image S cs e) Source # 

Methods

decode :: GIF -> ReadOptions GIF -> ByteString -> Image S cs e Source #

FileFormat (Sequence (Auto GIF)) Source # 
FileFormat (Sequence GIF) Source # 
(ColorSpace cs e, ToY cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto GIF) (Image r cs e) Source # 

Methods

encode :: Auto GIF -> WriteOptions (Auto GIF) -> Image r cs e -> ByteString Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable (Sequence GIF) (Array B Ix1 (GifDelay, Image r cs e)) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto GIF) (Image r cs e) Source # 

Methods

decode :: Auto GIF -> ReadOptions (Auto GIF) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto GIF)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (GifDelay, Image S cs e)) Source # 
ColorSpace cs e => Readable (Sequence GIF) (Array B Ix1 (Image S cs e)) Source # 
type ReadOptions GIF Source # 
type ReadOptions GIF = ()
type WriteOptions GIF Source # 
type ReadOptions (Sequence (Auto GIF)) Source # 
type ReadOptions (Sequence GIF) Source # 
type WriteOptions (Sequence (Auto GIF)) Source # 
type WriteOptions (Sequence GIF) Source # 

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.

Animated

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

HDR

data HDR Source #

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

Constructors

HDR 

Instances

Show HDR Source # 

Methods

showsPrec :: Int -> HDR -> ShowS #

show :: HDR -> String #

showList :: [HDR] -> ShowS #

FileFormat HDR Source # 

Associated Types

type ReadOptions HDR :: * Source #

type WriteOptions HDR :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable HDR (Image r cs e) Source # 

Methods

encode :: HDR -> WriteOptions HDR -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable HDR (Image S cs e) Source # 

Methods

decode :: HDR -> ReadOptions HDR -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToRGB cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto HDR) (Image r cs e) Source # 

Methods

encode :: Auto HDR -> WriteOptions (Auto HDR) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto HDR -> ReadOptions (Auto HDR) -> ByteString -> Image r cs e Source #

type ReadOptions HDR Source # 
type ReadOptions HDR = ()
type WriteOptions HDR Source # 
type WriteOptions HDR = ()

JPG

data JPG Source #

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

Constructors

JPG 

Instances

Show JPG Source # 

Methods

showsPrec :: Int -> JPG -> ShowS #

show :: JPG -> String #

showList :: [JPG] -> ShowS #

FileFormat JPG Source # 

Associated Types

type ReadOptions JPG :: * Source #

type WriteOptions JPG :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable JPG (Image r cs e) Source # 

Methods

encode :: JPG -> WriteOptions JPG -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable JPG (Image S cs e) Source # 

Methods

decode :: JPG -> ReadOptions JPG -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToYCbCr cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto JPG) (Image r cs e) Source # 

Methods

encode :: Auto JPG -> WriteOptions (Auto JPG) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto JPG -> ReadOptions (Auto JPG) -> ByteString -> Image r cs e Source #

type ReadOptions JPG Source # 
type ReadOptions JPG = ()
type WriteOptions JPG Source # 

woSetQualityJPG :: Word8 -> WriteOptionsJPG -> WriteOptionsJPG Source #

Set the image quality, supplied value will be clamped to [0, 100] range. This setting directly affects the Jpeg compression level.

PNG

data PNG Source #

Portable Network Graphics image with .png extension.

Constructors

PNG 

Instances

Show PNG Source # 

Methods

showsPrec :: Int -> PNG -> ShowS #

show :: PNG -> String #

showList :: [PNG] -> ShowS #

FileFormat PNG Source # 

Associated Types

type ReadOptions PNG :: * Source #

type WriteOptions PNG :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable PNG (Image r cs e) Source # 

Methods

encode :: PNG -> WriteOptions PNG -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable PNG (Image S cs e) Source # 

Methods

decode :: PNG -> ReadOptions PNG -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToYA cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto PNG) (Image r cs e) Source # 

Methods

encode :: Auto PNG -> WriteOptions (Auto PNG) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto PNG -> ReadOptions (Auto PNG) -> ByteString -> Image r cs e Source #

type ReadOptions PNG Source # 
type ReadOptions PNG = ()
type WriteOptions PNG Source # 
type WriteOptions PNG = ()

TGA

data TGA Source #

Truevision Graphics Adapter image with .tga extension.

Constructors

TGA 

Instances

Show TGA Source # 

Methods

showsPrec :: Int -> TGA -> ShowS #

show :: TGA -> String #

showList :: [TGA] -> ShowS #

FileFormat TGA Source # 

Associated Types

type ReadOptions TGA :: * Source #

type WriteOptions TGA :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TGA (Image r cs e) Source # 

Methods

encode :: TGA -> WriteOptions TGA -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable TGA (Image S cs e) Source # 

Methods

decode :: TGA -> ReadOptions TGA -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TGA) (Image r cs e) Source # 

Methods

encode :: Auto TGA -> WriteOptions (Auto TGA) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto TGA -> ReadOptions (Auto TGA) -> ByteString -> Image r cs e Source #

type ReadOptions TGA Source # 
type ReadOptions TGA = ()
type WriteOptions TGA Source # 
type WriteOptions TGA = ()

TIF

data TIF Source #

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

Constructors

TIF 

Instances

Show TIF Source # 

Methods

showsPrec :: Int -> TIF -> ShowS #

show :: TIF -> String #

showList :: [TIF] -> ShowS #

FileFormat TIF Source # 

Associated Types

type ReadOptions TIF :: * Source #

type WriteOptions TIF :: * Source #

(ColorSpace cs e, Source r Ix2 (Pixel cs e)) => Writable TIF (Image r cs e) Source # 

Methods

encode :: TIF -> WriteOptions TIF -> Image r cs e -> ByteString Source #

ColorSpace cs e => Readable TIF (Image S cs e) Source # 

Methods

decode :: TIF -> ReadOptions TIF -> ByteString -> Image S cs e Source #

(ColorSpace cs e, ToRGBA cs e, Source r Ix2 (Pixel cs e)) => Writable (Auto TIF) (Image r cs e) Source # 

Methods

encode :: Auto TIF -> WriteOptions (Auto TIF) -> Image r cs e -> ByteString Source #

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

Methods

decode :: Auto TIF -> ReadOptions (Auto TIF) -> ByteString -> Image r cs e Source #

type ReadOptions TIF Source # 
type ReadOptions TIF = ()
type WriteOptions TIF Source # 
type WriteOptions TIF = ()

JuciyPixels conversion

To JuicyPixels

toAnyCS :: forall r' cs' e' r cs e. (Source r' Ix2 (Pixel cs' e'), Mutable r Ix2 (Pixel cs e), Storable (Pixel cs e), ColorSpace cs e, ToYA cs' e', ToRGBA cs' e', ToHSIA cs' e', ToCMYKA cs' e', ToYCbCrA cs' e') => Image r' cs' e' -> Maybe (Image r cs e) Source #

From JuicyPixels

Netpbm formats

PBM

data PBM Source #

Netpbm: portable bitmap image with .pbm extension.

Constructors

PBM 

Instances

Show PBM Source # 

Methods

showsPrec :: Int -> PBM -> ShowS #

show :: PBM -> String #

showList :: [PBM] -> ShowS #

FileFormat PBM Source # 

Associated Types

type ReadOptions PBM :: * Source #

type WriteOptions PBM :: * Source #

ColorSpace cs e => Readable PBM (Image S cs e) Source # 

Methods

decode :: PBM -> ReadOptions PBM -> ByteString -> Image S cs e Source #

FileFormat (Sequence (Auto PBM)) Source # 
FileFormat (Sequence PBM) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PBM) (Image r cs e) Source # 

Methods

decode :: Auto PBM -> ReadOptions (Auto PBM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PBM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence PBM) (Array B Ix1 (Image S cs e)) Source # 
type ReadOptions PBM Source # 
type ReadOptions PBM = ()
type WriteOptions PBM Source # 
type WriteOptions PBM = ()
type ReadOptions (Sequence (Auto PBM)) Source # 
type ReadOptions (Sequence PBM) Source # 
type WriteOptions (Sequence (Auto PBM)) Source # 
type WriteOptions (Sequence PBM) Source # 

PGM

data PGM Source #

Netpbm: portable graymap image with .pgm extension.

Constructors

PGM 

Instances

Show PGM Source # 

Methods

showsPrec :: Int -> PGM -> ShowS #

show :: PGM -> String #

showList :: [PGM] -> ShowS #

FileFormat PGM Source # 

Associated Types

type ReadOptions PGM :: * Source #

type WriteOptions PGM :: * Source #

ColorSpace cs e => Readable PGM (Image S cs e) Source # 

Methods

decode :: PGM -> ReadOptions PGM -> ByteString -> Image S cs e Source #

FileFormat (Sequence (Auto PGM)) Source # 
FileFormat (Sequence PGM) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PGM) (Image r cs e) Source # 

Methods

decode :: Auto PGM -> ReadOptions (Auto PGM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PGM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence PGM) (Array B Ix1 (Image S cs e)) Source # 
type ReadOptions PGM Source # 
type ReadOptions PGM = ()
type WriteOptions PGM Source # 
type WriteOptions PGM = ()
type ReadOptions (Sequence (Auto PGM)) Source # 
type ReadOptions (Sequence PGM) Source # 
type WriteOptions (Sequence (Auto PGM)) Source # 
type WriteOptions (Sequence PGM) Source # 

PPM

data PPM Source #

Netpbm: portable pixmap image with .ppm extension.

Constructors

PPM 

Instances

Show PPM Source # 

Methods

showsPrec :: Int -> PPM -> ShowS #

show :: PPM -> String #

showList :: [PPM] -> ShowS #

FileFormat PPM Source # 

Associated Types

type ReadOptions PPM :: * Source #

type WriteOptions PPM :: * Source #

ColorSpace cs e => Readable PPM (Image S cs e) Source # 

Methods

decode :: PPM -> ReadOptions PPM -> ByteString -> Image S cs e Source #

FileFormat (Sequence (Auto PPM)) Source # 
FileFormat (Sequence PPM) Source # 
(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Auto PPM) (Image r cs e) Source # 

Methods

decode :: Auto PPM -> ReadOptions (Auto PPM) -> ByteString -> Image r cs e Source #

(Mutable r Ix2 (Pixel cs e), ColorSpace cs e) => Readable (Sequence (Auto PPM)) (Array B Ix1 (Image r cs e)) Source # 
ColorSpace cs e => Readable (Sequence PPM) (Array B Ix1 (Image S cs e)) Source # 
type ReadOptions PPM Source # 
type ReadOptions PPM = ()
type WriteOptions PPM Source # 
type WriteOptions PPM = ()
type ReadOptions (Sequence (Auto PPM)) Source # 
type ReadOptions (Sequence PPM) Source # 
type WriteOptions (Sequence (Auto PPM)) Source # 
type WriteOptions (Sequence PPM) Source # 

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

List of image formats that are currently supported, and their exact ColorSpaces and precision for reading and writing without an implicit conversion: