The sdl2-cairo-image package

[ Tags: graphics, library, mit ] [ Propose Tags ]

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
Category Graphics
Source repo head: git clone
Uploaded Sat Nov 14 11:32:54 UTC 2015 by jaiyalas
Distributions NixOS:
Downloads 577 total (21 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for sdl2-cairo-image-

[back to package description]


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!