Copyright | (c) Alexis Williams 2016 |
---|---|
License | BSD3 |
Maintainer | sasinestro@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Data.STBImage
Description
Much like the original library, the focus of this library is placed on ease of use rather than richness of feature set, thus the rather spartan interface.
Documentation
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.
Constructors
YColor | |
Fields
|
Constructors
YAColor | |
Fields
|
Constructors
RGBAColor | |
Fields
|
Image
is the least opinionated reasonable type to represent an image, just a vector of pixel Color
s (laid out top-to-bottom, left-to-right) and a size.