The sdl2-cairo-image package

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

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


[Skip to Readme]

Properties

Versions 1.0, 1.0.0.1, 1.0.0.2
Change log ChangeLog.md
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
Maintainer jaiyalas@gmail.com
Category Graphics
Source repository head: git clone https://github.com/jaiyalas/sdl2-cairo-image
Uploaded Sat Nov 14 11:32:54 UTC 2015 by jaiyalas
Distributions NixOS:1.0.0.2
Downloads 229 total (4 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

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for sdl2-cairo-image-1.0.0.2

[back to package description]

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!