sdl2-cairo-image-1.0: An image loading and rendering library for sdl2 / sdl2-cairo

CopyrightCopyright (c) 2015 Yun-Yan Chi
LicenseMIT
Maintainerjaiyalas@gmail.com
Safe HaskellNone
LanguageHaskell2010

SDL.Cairo.Image.Load

Contents

Description

This module exposes wrapper functions to load image files into memory by using JuicyPixel (See https://hackage.haskell.org/package/JuicyPixels).

So far, supported file formats are only PNG, JPG, BMP. Plus, merely four pixel formats PixelRGB8, PixelRGB16, PixelRGBA8 and PixelRGBA16 are supported.

Synopsis

loading Image

loadRGB8 :: ImgType -> FilePath -> IO (Image PixelRGB8) Source

loadRGB16 :: ImgType -> FilePath -> IO (Image PixelRGB16) Source

loadRGBA8 :: ImgType -> FilePath -> IO (Image PixelRGBA8) Source

loadRGBA16 :: ImgType -> FilePath -> IO (Image PixelRGBA16) Source

loadable format

data ImgType Source

Constructors

PNG 
JPG 
BMP 

Default 5x5 Image

defImageRGB8 :: Image PixelRGB8 Source

defImageRGB16 :: Image PixelRGB16 Source

defImageRGBA8 :: Image PixelRGBA8 Source

defImageRGBA16 :: Image PixelRGBA16 Source