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

[ graphics, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0, 1.0.0.1, 1.0.0.2
Change log ChangeLog.md
Dependencies base (>=4 && <5), 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 <jaiyalas@gmail.com>
Maintainer Yun-Yan Chi <jaiyalas@gmail.com>
Category Graphics
Source repo head: git clone https://github.com/jaiyalas/sdl2-cairo-image
Uploaded by jaiyalas at 2015-11-14T10:18:50Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables main
Downloads 2108 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for sdl2-cairo-image-1.0

[back to package description]

sdl2-cairo-image

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!