stb-image-redux-0.2.1.3: Image loading and writing microlibrary
Safe HaskellNone
LanguageHaskell2010

Data.STBImage.Color

Documentation

class Storable a => Color a where Source #

Associated Types

data ColorFlag a :: * Source #

Methods

loadImage :: ColorFlag a -> FilePath -> IO (Either String (Image a)) Source #

loadImage reads the image (with ColorFlag Y, YA, RGB, or RGBA) at the supplied path.

writePNG :: FilePath -> Image a -> IO () Source #

writePNG writes the image passed to it out at the path path in PNG format. The path must include the extension.

writeBMP :: FilePath -> Image a -> IO () Source #

writeBMP writes the image passed to it out at the path path in BMP format. The path must include the extension.

writeTGA :: FilePath -> Image a -> IO () Source #

writeTGA writes the image passed to it out at the path path in TGA format. The path must include the extension.

red :: a -> Word8 Source #

green :: a -> Word8 Source #

blue :: a -> Word8 Source #

alpha :: a -> Word8 Source #

Instances

Instances details
Color RGBAColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag RGBAColor Source #

Color RGBColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag RGBColor Source #

Color YAColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag YAColor Source #

Color YColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag YColor Source #

data YColor Source #

Constructors

YColor 

Fields

Instances

Instances details
Eq YColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Methods

(==) :: YColor -> YColor -> Bool #

(/=) :: YColor -> YColor -> Bool #

Show YColor Source # 
Instance details

Defined in Data.STBImage.Color

Generic YColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Associated Types

type Rep YColor :: Type -> Type #

Methods

from :: YColor -> Rep YColor x #

to :: Rep YColor x -> YColor #

Storable YColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Color YColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag YColor Source #

Show (ColorFlag YColor) Source # 
Instance details

Defined in Data.STBImage.Color

type Rep YColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

type Rep YColor = D1 ('MetaData "YColor" "Data.STBImage.ColorTypes" "stb-image-redux-0.2.1.3-inplace" 'False) (C1 ('MetaCons "YColor" 'PrefixI 'True) (S1 ('MetaSel ('Just "_yGreyscale") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))
data ColorFlag YColor Source # 
Instance details

Defined in Data.STBImage.Color

data YAColor Source #

Constructors

YAColor 

Instances

Instances details
Eq YAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Methods

(==) :: YAColor -> YAColor -> Bool #

(/=) :: YAColor -> YAColor -> Bool #

Show YAColor Source # 
Instance details

Defined in Data.STBImage.Color

Generic YAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Associated Types

type Rep YAColor :: Type -> Type #

Methods

from :: YAColor -> Rep YAColor x #

to :: Rep YAColor x -> YAColor #

Storable YAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Color YAColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag YAColor Source #

Show (ColorFlag YAColor) Source # 
Instance details

Defined in Data.STBImage.Color

type Rep YAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

type Rep YAColor = D1 ('MetaData "YAColor" "Data.STBImage.ColorTypes" "stb-image-redux-0.2.1.3-inplace" 'False) (C1 ('MetaCons "YAColor" 'PrefixI 'True) (S1 ('MetaSel ('Just "_yaGreyscale") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8) :*: S1 ('MetaSel ('Just "_yaAlpha") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))
data ColorFlag YAColor Source # 
Instance details

Defined in Data.STBImage.Color

data RGBColor Source #

Constructors

RGBColor 

Instances

Instances details
Eq RGBColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Show RGBColor Source # 
Instance details

Defined in Data.STBImage.Color

Generic RGBColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Associated Types

type Rep RGBColor :: Type -> Type #

Methods

from :: RGBColor -> Rep RGBColor x #

to :: Rep RGBColor x -> RGBColor #

Storable RGBColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Color RGBColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag RGBColor Source #

Show (ColorFlag RGBColor) Source # 
Instance details

Defined in Data.STBImage.Color

type Rep RGBColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

type Rep RGBColor = D1 ('MetaData "RGBColor" "Data.STBImage.ColorTypes" "stb-image-redux-0.2.1.3-inplace" 'False) (C1 ('MetaCons "RGBColor" 'PrefixI 'True) (S1 ('MetaSel ('Just "_rgbRed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8) :*: (S1 ('MetaSel ('Just "_rgbGreen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8) :*: S1 ('MetaSel ('Just "_rgbBlue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8))))
data ColorFlag RGBColor Source # 
Instance details

Defined in Data.STBImage.Color

data RGBAColor Source #

Constructors

RGBAColor 

Instances

Instances details
Eq RGBAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Show RGBAColor Source # 
Instance details

Defined in Data.STBImage.Color

Generic RGBAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Associated Types

type Rep RGBAColor :: Type -> Type #

Storable RGBAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

Color RGBAColor Source # 
Instance details

Defined in Data.STBImage.Color

Associated Types

data ColorFlag RGBAColor Source #

Show (ColorFlag RGBAColor) Source # 
Instance details

Defined in Data.STBImage.Color

type Rep RGBAColor Source # 
Instance details

Defined in Data.STBImage.ColorTypes

type Rep RGBAColor = D1 ('MetaData "RGBAColor" "Data.STBImage.ColorTypes" "stb-image-redux-0.2.1.3-inplace" 'False) (C1 ('MetaCons "RGBAColor" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_rgbaRed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8) :*: S1 ('MetaSel ('Just "_rgbaGreen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)) :*: (S1 ('MetaSel ('Just "_rgbaBlue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8) :*: S1 ('MetaSel ('Just "_rgbaAlpha") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8))))
data ColorFlag RGBAColor Source # 
Instance details

Defined in Data.STBImage.Color

Orphan instances

Show RGBAColor Source # 
Instance details

Show RGBColor Source # 
Instance details

Show YAColor Source # 
Instance details

Show YColor Source # 
Instance details