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

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

Graphics.Image.IO.Formats

Contents

Description

 

Synopsis

Documentation

data BMP Source #

Bitmap image with .bmp extension.

Constructors

BMP 

Instances

ImageFormat BMP Source # 

Associated Types

data SaveOption BMP :: * Source #

data SaveOption BMP Source # 

data GIF Source #

Graphics Interchange Format image with .gif extension.

Constructors

GIF 

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.

data HDR Source #

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

Constructors

HDR 

Instances

ImageFormat HDR Source # 

Associated Types

data SaveOption HDR :: * Source #

data SaveOption HDR Source # 

data JPG Source #

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

Constructors

JPG 

Instances

data PNG Source #

Portable Network Graphics image with .png extension.

Constructors

PNG 

Instances

ImageFormat PNG Source # 

Associated Types

data SaveOption PNG :: * Source #

data SaveOption PNG Source # 

data TGA Source #

Truevision Graphics Adapter image with .tga extension.

Constructors

TGA 

Instances

ImageFormat TGA Source # 

Associated Types

data SaveOption TGA :: * Source #

data SaveOption TGA Source # 

data TIF Source #

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

Constructors

TIF 

Instances

ImageFormat TIF Source # 

Associated Types

data SaveOption 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 

Instances

ImageFormat PPM Source # 

Associated Types

data SaveOption PPM :: * Source #

ImageFormat [PPM] Source # 

Associated Types

data SaveOption [PPM] :: * Source #

Methods

ext :: [PPM] -> String Source #

exts :: [PPM] -> [String] Source #

isFormat :: String -> [PPM] -> Bool Source #

Readable [Image VS RGB Word8] [PPM] Source # 
Readable [Image VS RGB Word16] [PPM] Source # 
Readable (Image VS YA Double) PPM Source # 
Readable (Image VS Y Double) PPM Source # 
Readable (Image VS RGBA Double) PPM Source # 
Readable (Image VS RGB Double) PPM Source # 
Readable (Image VS RGB Word8) PPM Source # 
Readable (Image VS RGB Word16) PPM Source # 
data SaveOption PPM Source # 
data SaveOption [PPM] Source # 

data InputFormat Source #

A collection of all image formats that can be read into HIP images.

data OutputFormat Source #

A collection of all image formats that can be written to file using images with Double precision pixels.

Instances

Bounded OutputFormat Source # 
Enum OutputFormat Source # 
Eq OutputFormat Source # 
Show OutputFormat Source # 
ImageFormat OutputFormat 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 # 
data SaveOption OutputFormat Source # 

class ImageFormat format => Readable img format where Source #

Image formats that can be read from file.

Minimal complete definition

decode

Methods

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

Decode an image from ByteString.

Instances

Readable [Image VS Y Word8] [PGM] Source # 
Readable [Image VS Y Word16] [PGM] Source # 
Readable [Image VS RGB Word8] [PPM] Source # 
Readable [Image VS RGB Word16] [PPM] Source # 
Readable [Image VS Binary Bit] [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 # 
Readable (Image VS YA Double) PPM Source # 
Readable (Image VS Y Double) PPM Source # 
Readable (Image VS Y Double) PGM Source # 
Readable (Image VS Y Double) PBM Source # 
Readable (Image VS Y Word8) PGM Source # 
Readable (Image VS Y Word16) PGM Source # 
Readable (Image VS RGBA Double) PPM Source # 
Readable (Image VS RGB Double) PPM Source # 
Readable (Image VS RGB Word8) PPM Source # 
Readable (Image VS RGB Word16) PPM Source # 
Readable (Image VS Binary Bit) PBM Source # 

class ImageFormat format => Writable img format where Source #

Image formats that can be written to file.

Minimal complete definition

encode

Methods

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

Encode an image to ByteString.

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.

Instances

ImageFormat TIF Source # 

Associated Types

data SaveOption TIF :: * Source #

ImageFormat TGA Source # 

Associated Types

data SaveOption TGA :: * Source #

ImageFormat PNG Source # 

Associated Types

data SaveOption PNG :: * Source #

ImageFormat JPG Source # 

Associated Types

data SaveOption JPG :: * Source #

ImageFormat HDR Source # 

Associated Types

data SaveOption HDR :: * Source #

ImageFormat GIFA Source # 

Associated Types

data SaveOption GIFA :: * Source #

ImageFormat GIF Source # 

Associated Types

data SaveOption GIF :: * Source #

ImageFormat BMP Source # 

Associated Types

data SaveOption BMP :: * Source #

ImageFormat PPM Source # 

Associated Types

data SaveOption PPM :: * Source #

ImageFormat PGM Source # 

Associated Types

data SaveOption PGM :: * Source #

ImageFormat PBM Source # 

Associated Types

data SaveOption PBM :: * Source #

ImageFormat OutputFormat Source # 
ImageFormat InputFormat Source # 
ImageFormat [PPM] Source # 

Associated Types

data SaveOption [PPM] :: * Source #

Methods

ext :: [PPM] -> String Source #

exts :: [PPM] -> [String] Source #

isFormat :: String -> [PPM] -> Bool Source #

ImageFormat [PGM] Source # 

Associated Types

data SaveOption [PGM] :: * Source #

Methods

ext :: [PGM] -> String Source #

exts :: [PGM] -> [String] Source #

isFormat :: String -> [PGM] -> Bool Source #

ImageFormat [PBM] Source # 

Associated Types

data SaveOption [PBM] :: * Source #

Methods

ext :: [PBM] -> String Source #

exts :: [PBM] -> [String] Source #

isFormat :: String -> [PBM] -> Bool Source #

class Convertible a b where Source #

Used during converting pixels between libraries.

Minimal complete definition

convert

Methods

convert :: a -> b Source #

Instances

ToRGBA cs e => Convertible (Pixel cs e) (Pixel RGBA Double) Source # 

Methods

convert :: Pixel cs e -> Pixel RGBA Double Source #

ToRGB cs e => Convertible (Pixel cs e) (Pixel RGB Double) Source # 

Methods

convert :: Pixel cs e -> Pixel RGB Double Source #

ToYA cs e => Convertible (Pixel cs e) (Pixel YA Double) Source # 

Methods

convert :: Pixel cs e -> Pixel YA Double Source #

ToY cs e => Convertible (Pixel cs e) (Pixel Y Double) Source # 

Methods

convert :: Pixel cs e -> Pixel Y Double Source #

Orphan instances

(Array arr cs e, Array arr cs (Complex e), RealFloat e, Applicative (Pixel cs), Writable (Image arr cs e) format) => Writable (Image arr cs (Complex e)) format Source # 

Methods

encode :: format -> [SaveOption format] -> Image arr cs (Complex e) -> ByteString Source #