The sdl2-cairo-image package

[Tags:library, mit]

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

[Skip to Readme]


Versions 1.0,,
Change log
Dependencies base (==4.*), cairo (>=0.13), convertible (>=1.1), JuicyPixels (>=3.2), linear (>=1.19), sdl2 (>=2.0), sdl2-cairo (>=0.1), vector (>=0.11) [details]
License MIT
Author Yun-Yan Chi
Stability Unknown
Category Graphics
Source repository head: git clone
Uploaded Sat Nov 14 11:32:54 UTC 2015 by jaiyalas
Distributions NixOS:
Downloads 181 total (1 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for sdl2-cairo-image

Readme for sdl2-cairo-image-


MIT Haskell

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


This module can easily install via Cabal.

> cabal update
> cabal install sdl2-cairo-image


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!