The yesod-media-simple package

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

[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.2.0.0
Dependencies base (==4.*), bytestring, diagrams-cairo, diagrams-core, diagrams-lib (==1.3.*), directory, JuicyPixels, vector, yesod (>1.2) [details]
License MIT
Copyright 2014 Michael Sloan
Author Michael Sloan
Maintainer mgsloan@gmail.com
Category Graphics
Home page https://github.com/mgsloan/yesod-media-simple
Uploaded Tue Oct 13 02:55:47 UTC 2015 by MichaelSloan
Distributions NixOS:0.2.0.0
Downloads 369 total (46 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-13 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for yesod-media-simple-0.2.0.0

[back to package description]

yesod-media-simple

This package provides simple utilities for starting a web server which serves some media. This makes serving media as easy as serve image. For example, here's how you serve a simple diagram:

import Diagrams.Prelude
import Yesod.Media.Simple

main = serveDiagram (circle 10 ||| square 20)

Media Types

Currently yesod-media-simple supports serving the following media types:

  • Diagrams, by using cairo to render to png. Just call serveDiagram :: Diagram Cairo R2 -> IO ()!

  • JuicyPixels images. Also includes utilities for putting JuicyPixels images in Diagrams and vice-versa.