friday-0.2.3.1: A functional image processing library for Haskell.

Safe HaskellNone
LanguageHaskell2010

Vision.Image.Conversion

Contents

Synopsis

Documentation

class Convertible a b where #

A typeclass that represents something that can be converted. A Convertible a b instance represents an a that can be converted to a b.

Minimal complete definition

safeConvert

Methods

safeConvert :: a -> ConvertResult b #

Convert a to b, returning Right on success and Left on error. For a simpler interface, see convert.

Instances

(Storable p1, Storable p2, Convertible p1 p2) => Convertible (Delayed p1) (Manifest p2) # 
(Storable p1, Storable p2, Convertible p1 p2) => Convertible (Delayed p1) (Delayed p2) # 
(Storable p1, Storable p2, Convertible p1 p2) => Convertible (Manifest p1) (Delayed p2) # 
(Storable p1, Storable p2, Convertible p1 p2) => Convertible (Manifest p1) (Manifest p2) # 

convert :: Convertible a b => a -> b #

Convert from one type of data to another. Raises an exception if there is an error with the conversion. For a function that does not raise an exception in that case, see safeConvert.

Orphan instances

Convertible GreyPixel GreyPixel Source # 
Convertible GreyPixel HSVPixel Source # 
Convertible GreyPixel RGBPixel Source # 
Convertible GreyPixel RGBAPixel Source # 
Convertible HSVPixel GreyPixel Source # 
Convertible HSVPixel HSVPixel Source # 
Convertible HSVPixel RGBPixel Source # 
Convertible HSVPixel RGBAPixel Source # 
Convertible RGBPixel GreyPixel Source # 
Convertible RGBPixel HSVPixel Source # 
Convertible RGBPixel RGBPixel Source # 
Convertible RGBPixel RGBAPixel Source # 
Convertible RGBAPixel GreyPixel Source # 
Convertible RGBAPixel HSVPixel Source # 
Convertible RGBAPixel RGBPixel Source # 
Convertible RGBAPixel RGBAPixel Source #