hip-1.0.1: Haskell Image Processing (HIP) Library.

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

Graphics.Image.IO.External

Description

 

Synopsis

Documentation

data GIF Source

Graphics Interchange Format image with .gif extension.

Constructors

GIF 

Instances

ImageFormat GIF Source 
ImageFormat [GIF] Source 
ManifestArray arr RGB Double => Writable [(GifDelay, Image arr RGB Double)] [GIF] Source 
ManifestArray arr RGB Word8 => Writable [(GifDelay, Image arr RGB Word8)] [GIF] Source 
Array arr RGBA Double => Readable [Image arr RGBA Double] [GIF] Source 
Array arr RGB Double => Readable [Image arr RGB Double] [GIF] Source 
Array arr YA Double => Readable [Image arr YA Double] [GIF] Source 
Array arr Y Double => Readable [Image arr Y Double] [GIF] Source 
Array arr RGBA Word8 => Readable [Image arr RGBA Word8] [GIF] Source 
Array arr RGB Word8 => Readable [Image arr RGB Word8] [GIF] Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) GIF Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) GIF Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) GIF Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) GIF Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) GIF Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) GIF Source 
Array arr RGB Double => Readable (Image arr RGB Double) GIF Source 
Array arr YA Double => Readable (Image arr YA Double) GIF Source 
Array arr Y Double => Readable (Image arr Y Double) GIF Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) GIF Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) GIF Source 
data SaveOption GIF = GIFPalette PaletteOptions Source 
data SaveOption [GIF] Source 

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

paletteCreationMethod :: PaletteCreationMethod

Algorithm used to find the palette

enableImageDithering :: Bool

Do we want to apply the dithering to the image. Enabling it often reduce compression ratio but enhance the perceived quality of the final image.

paletteColorCount :: Int

Maximum number of color we want in the palette

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.

data PNG Source

Portable Network Graphics image with .png extension.

Constructors

PNG 

Instances

ImageFormat PNG Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) PNG Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) PNG Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) PNG Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) PNG Source 
ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) PNG Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) PNG Source 
ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) PNG Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) PNG Source 
ManifestArray arr YA Word16 => Writable (Image arr YA Word16) PNG Source 
ManifestArray arr YA Word8 => Writable (Image arr YA Word8) PNG Source 
ManifestArray arr Y Word16 => Writable (Image arr Y Word16) PNG Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) PNG Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) PNG Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) PNG Source 
Array arr RGB Double => Readable (Image arr RGB Double) PNG Source 
Array arr YA Double => Readable (Image arr YA Double) PNG Source 
Array arr Y Double => Readable (Image arr Y Double) PNG Source 
Array arr RGBA Word16 => Readable (Image arr RGBA Word16) PNG Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) PNG Source 
Array arr RGB Word16 => Readable (Image arr RGB Word16) PNG Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) PNG Source 
Array arr YA Word16 => Readable (Image arr YA Word16) PNG Source 
Array arr YA Word8 => Readable (Image arr YA Word8) PNG Source 
Array arr Y Word16 => Readable (Image arr Y Word16) PNG Source 
Array arr Y Word8 => Readable (Image arr Y Word8) PNG Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) PNG Source 
data SaveOption PNG Source 

data TIF Source

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

Constructors

TIF 

Instances

ImageFormat TIF Source 
ManifestArray arr CMYK Double => Writable (Image arr CMYK Double) TIF Source 
ManifestArray arr YCbCr Double => Writable (Image arr YCbCr Double) TIF Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TIF Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) TIF Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) TIF Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) TIF Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TIF Source 
ManifestArray arr CMYK Word16 => Writable (Image arr CMYK Word16) TIF Source 
ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) TIF Source 
ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) TIF Source 
ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) TIF Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TIF Source 
ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) TIF Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TIF Source 
ManifestArray arr YA Word16 => Writable (Image arr YA Word16) TIF Source 
ManifestArray arr YA Word8 => Writable (Image arr YA Word8) TIF Source 
ManifestArray arr Y Word16 => Writable (Image arr Y Word16) TIF Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TIF Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) TIF Source 
Array arr RGB Double => Readable (Image arr RGB Double) TIF Source 
Array arr YA Double => Readable (Image arr YA Double) TIF Source 
Array arr Y Double => Readable (Image arr Y Double) TIF Source 
Array arr CMYK Word16 => Readable (Image arr CMYK Word16) TIF Source 
Array arr CMYK Word8 => Readable (Image arr CMYK Word8) TIF Source 
Array arr RGBA Word16 => Readable (Image arr RGBA Word16) TIF Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TIF Source 
Array arr RGB Word16 => Readable (Image arr RGB Word16) TIF Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) TIF Source 
Array arr YA Word16 => Readable (Image arr YA Word16) TIF Source 
Array arr YA Word8 => Readable (Image arr YA Word8) TIF Source 
Array arr Y Word16 => Readable (Image arr Y Word16) TIF Source 
Array arr Y Word8 => Readable (Image arr Y Word8) TIF Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TIF Source 
data SaveOption TIF Source 

data PBM Source

Netpbm: portable bitmap image with .pbm extension.

Constructors

PBM 

data PGM Source

Netpbm: portable graymap image with .pgm extension.

Constructors

PGM 

data PPM Source

Netpbm: portable pixmap image with .ppm extension.

Constructors

PPM 

data InputFormat Source

A collection of all image formats that can be read into HIP images with Double precision pixel channels.

data OutputFormat Source

A collection of all image formats that can be written from HIP images with Double precision pixel channels.

class ImageFormat format => Readable img format where Source

Image formats that can be read from file.

Methods

decode :: format -> ByteString -> Either String img Source

Decode an image from ByteString.

Instances

Array arr RGBA Double => Readable [Image arr RGBA Double] [GIF] Source 
Array arr RGB Double => Readable [Image arr RGB Double] [GIF] Source 
Array arr YA Double => Readable [Image arr YA Double] [GIF] Source 
Array arr Y Double => Readable [Image arr Y Double] [GIF] Source 
Array arr RGBA Word8 => Readable [Image arr RGBA Word8] [GIF] Source 
Array arr RGB Word8 => Readable [Image arr RGB Word8] [GIF] Source 
Array arr RGB Word16 => Readable [Image arr RGB Word16] [PPM] Source 
Array arr RGB Word8 => Readable [Image arr RGB Word8] [PPM] Source 
Array arr Y Word16 => Readable [Image arr Y Word16] [PGM] Source 
Array arr Y Word8 => Readable [Image arr Y Word8] [PGM] Source 
Array arr Binary Bit => Readable [Image arr Binary Bit] [PBM] Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) TIF Source 
Array arr RGB Double => Readable (Image arr RGB Double) TIF Source 
Array arr YA Double => Readable (Image arr YA Double) TIF Source 
Array arr Y Double => Readable (Image arr Y Double) TIF Source 
Array arr CMYK Word16 => Readable (Image arr CMYK Word16) TIF Source 
Array arr CMYK Word8 => Readable (Image arr CMYK Word8) TIF Source 
Array arr RGBA Word16 => Readable (Image arr RGBA Word16) TIF Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TIF Source 
Array arr RGB Word16 => Readable (Image arr RGB Word16) TIF Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) TIF Source 
Array arr YA Word16 => Readable (Image arr YA Word16) TIF Source 
Array arr YA Word8 => Readable (Image arr YA Word8) TIF Source 
Array arr Y Word16 => Readable (Image arr Y Word16) TIF Source 
Array arr Y Word8 => Readable (Image arr Y Word8) TIF Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TIF Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) TGA Source 
Array arr RGB Double => Readable (Image arr RGB Double) TGA Source 
Array arr YA Double => Readable (Image arr YA Double) TGA Source 
Array arr Y Double => Readable (Image arr Y Double) TGA Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TGA Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) TGA Source 
Array arr Y Word8 => Readable (Image arr Y Word8) TGA Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TGA Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) PNG Source 
Array arr RGB Double => Readable (Image arr RGB Double) PNG Source 
Array arr YA Double => Readable (Image arr YA Double) PNG Source 
Array arr Y Double => Readable (Image arr Y Double) PNG Source 
Array arr RGBA Word16 => Readable (Image arr RGBA Word16) PNG Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) PNG Source 
Array arr RGB Word16 => Readable (Image arr RGB Word16) PNG Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) PNG Source 
Array arr YA Word16 => Readable (Image arr YA Word16) PNG Source 
Array arr YA Word8 => Readable (Image arr YA Word8) PNG Source 
Array arr Y Word16 => Readable (Image arr Y Word16) PNG Source 
Array arr Y Word8 => Readable (Image arr Y Word8) PNG Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) PNG Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) JPG Source 
Array arr RGB Double => Readable (Image arr RGB Double) JPG Source 
Array arr YA Double => Readable (Image arr YA Double) JPG Source 
Array arr Y Double => Readable (Image arr Y Double) JPG Source 
Array arr YCbCr Word8 => Readable (Image arr YCbCr Word8) JPG Source 
Array arr CMYK Word8 => Readable (Image arr CMYK Word8) JPG Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) JPG Source 
Array arr YA Word8 => Readable (Image arr YA Word8) JPG Source 
Array arr Y Word8 => Readable (Image arr Y Word8) JPG Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) HDR Source 
Array arr RGB Double => Readable (Image arr RGB Double) HDR Source 
Array arr YA Double => Readable (Image arr YA Double) HDR Source 
Array arr Y Double => Readable (Image arr Y Double) HDR Source 
Array arr RGB Float => Readable (Image arr RGB Float) HDR Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) GIF Source 
Array arr RGB Double => Readable (Image arr RGB Double) GIF Source 
Array arr YA Double => Readable (Image arr YA Double) GIF Source 
Array arr Y Double => Readable (Image arr Y Double) GIF Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) GIF Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) GIF Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) BMP Source 
Array arr RGB Double => Readable (Image arr RGB Double) BMP Source 
Array arr YA Double => Readable (Image arr YA Double) BMP Source 
Array arr Y Double => Readable (Image arr Y Double) BMP Source 
Array arr RGBA Word8 => Readable (Image arr RGBA Word8) BMP Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) BMP Source 
Array arr Y Word8 => Readable (Image arr Y Word8) BMP Source 
(Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) BMP Source 
Array arr RGB Word16 => Readable (Image arr RGB Word16) PPM Source 
Array arr RGB Word8 => Readable (Image arr RGB Word8) PPM Source 
Array arr Y Word16 => Readable (Image arr Y Word16) PGM Source 
Array arr Y Word8 => Readable (Image arr Y Word8) PGM Source 
Array arr Binary Bit => Readable (Image arr Binary Bit) PBM Source 
Array arr RGBA Double => Readable (Image arr RGBA Double) PPM Source 
Array arr RGB Double => Readable (Image arr RGB Double) PPM Source 
Array arr YA Double => Readable (Image arr YA Double) PPM Source 
Array arr Y Double => Readable (Image arr Y Double) PPM Source 
Array arr Y Double => Readable (Image arr Y Double) PGM Source 
Array arr Y Double => Readable (Image arr Y Double) PBM Source 
(Readable (Image arr cs Double) BMP, Readable (Image arr cs Double) GIF, Readable (Image arr cs Double) HDR, Readable (Image arr cs Double) JPG, Readable (Image arr cs Double) PNG, Readable (Image arr cs Double) TGA, Readable (Image arr cs Double) TIF, Readable (Image arr cs Double) PPM) => Readable (Image arr cs Double) InputFormat Source 

class ImageFormat format => Writable img format where Source

Image formats that can be written to file.

Methods

encode :: format -> [SaveOption format] -> img -> ByteString Source

Encode an image to ByteString.

Instances

ManifestArray arr RGB Double => Writable [(GifDelay, Image arr RGB Double)] [GIF] Source 
ManifestArray arr RGB Word8 => Writable [(GifDelay, Image arr RGB Word8)] [GIF] Source 
ManifestArray arr CMYK Double => Writable (Image arr CMYK Double) TIF Source 
ManifestArray arr YCbCr Double => Writable (Image arr YCbCr Double) TIF Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TIF Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) TIF Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) TIF Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) TIF Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TIF Source 
ManifestArray arr CMYK Word16 => Writable (Image arr CMYK Word16) TIF Source 
ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) TIF Source 
ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) TIF Source 
ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) TIF Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TIF Source 
ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) TIF Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TIF Source 
ManifestArray arr YA Word16 => Writable (Image arr YA Word16) TIF Source 
ManifestArray arr YA Word8 => Writable (Image arr YA Word8) TIF Source 
ManifestArray arr Y Word16 => Writable (Image arr Y Word16) TIF Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TIF Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TGA Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) TGA Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) TGA Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) TGA Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TGA Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TGA Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TGA Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TGA Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) PNG Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) PNG Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) PNG Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) PNG Source 
ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) PNG Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) PNG Source 
ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) PNG Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) PNG Source 
ManifestArray arr YA Word16 => Writable (Image arr YA Word16) PNG Source 
ManifestArray arr YA Word8 => Writable (Image arr YA Word8) PNG Source 
ManifestArray arr Y Word16 => Writable (Image arr Y Word16) PNG Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) PNG Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) PNG Source 
ManifestArray arr YCbCr Double => Writable (Image arr YCbCr Double) JPG Source 
ManifestArray arr CMYK Double => Writable (Image arr CMYK Double) JPG Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) JPG Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) JPG Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) JPG Source 
ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) JPG Source 
ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) JPG Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) JPG Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) JPG Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) HDR Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) HDR Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) HDR Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) HDR Source 
ManifestArray arr RGB Float => Writable (Image arr RGB Float) HDR Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) GIF Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) GIF Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) GIF Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) GIF Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) GIF Source 
ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) BMP Source 
ManifestArray arr RGB Double => Writable (Image arr RGB Double) BMP Source 
ManifestArray arr YA Double => Writable (Image arr YA Double) BMP Source 
ManifestArray arr Y Double => Writable (Image arr Y Double) BMP Source 
ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) BMP Source 
ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) BMP Source 
ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) BMP Source 
ManifestArray arr Y Word8 => Writable (Image arr Y Word8) BMP Source 
(Writable (Image arr cs Double) BMP, Writable (Image arr cs Double) GIF, Writable (Image arr cs Double) HDR, Writable (Image arr cs Double) JPG, Writable (Image arr cs Double) PNG, Writable (Image arr cs Double) TGA, Writable (Image arr cs Double) TIF) => Writable (Image arr cs Double) OutputFormat Source 

class ImageFormat format where Source

Image file format. Helps in guessing image format using a file extension, as well as supplying format specific options during saving an image.

Minimal complete definition

ext

Associated Types

data SaveOption format Source

Options that can be used during writing an image in this format.

Methods

ext :: format -> String Source

Default file extension for this image format.

exts :: format -> [String] Source

Known extensions for this image format.

isFormat :: String -> format -> Bool Source

Returns True if a file extension (ex. ".png") corresponds to this format.