sdl2-cairo-image

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

Latest on Hackage:1.0.0.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Yun-Yan Chi
Maintained by jaiyalas@gmail.com

sdl2-cairo-image

MIT Haskell

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

Installation

This module can easily install via Cabal.

> cabal update
> cabal install sdl2-cairo-image

Usage

Loading image

Assume one import this module as

import qualified SDL.Cairo.Image as I

One can load an image within an IO a. For example,

main = do
   img <- I.loadRGBA8 PNG "wherever/your/image/is/img.png"

If this file is loaded correctly then img will be a Image PixelRGBA8. If failed, img will be a default 5x5 image (i.e. I.defImageRGBA8).

Displaying image

Please read here!

Changes

Revision history for sdl2-cairo-image

0.0.0 -- YYYY-mm-dd

  • First version. Released on an unsuspecting world.
comments powered byDisqus