hakyll-images: Hakyll utilities to work with images

[ bsd3, library, web ] [ Propose Tags ]
This version is deprecated.

hakyll-images is an add-on to the hakyll package. It adds utilities to work with images, including JPEG compression.


[Skip to Readme]

Modules

[Last Documentation]

  • Hakyll
    • Hakyll.Images
      • Hakyll.Images.CompressJpg
      • Hakyll.Images.Resize

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2 (info)
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), bytestring (>=0.9 && <0.11), hakyll (>4), JuicyPixels (>=3), JuicyPixels-extra (>0.3) [details]
License BSD-3-Clause
Author Laurent P. René de Cotret
Maintainer Laurent P. René de Cotret
Category Web
Home page https://github.com/LaurentRDC/hakyll-images#readme
Bug tracker https://github.com/LaurentRDC/hakyll-images/issues
Source repo head: git clone https://github.com/LaurentRDC/hakyll-images
Uploaded by LaurentRDC at 2018-12-19T02:07:47Z
Distributions NixOS:1.2.2
Downloads 5202 total (61 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2018-12-19 [all 3 reports]

Readme for hakyll-images-0.1.0

[back to package description]

hakyll-images

Hackage version Build status

A Haskell package containing utilities to deal with images in the context of Hakyll

Hakyll is a static website compiler library. As one of the benefits of static websites is their small size, this repository aims at providing utilities to work with images in the context of Hakyll. Example usage includes:

  • Re-encoding Jpeg images at a lower quality to make them much smaller;
  • Re-sizing images to fit within a certain shape;

Usage

hakyll-images is meant to be integrated within a Hakyll program. Here are some examples within a Hakyll program:

import Hakyll
import Hakyll.Images        ( compressJpgCompiler
                            , resizeImageCompiler
                            , scaleImageCompiler
                            )

(...)

hakyll $ do

    -- Compress all source Jpegs to a Jpeg quality of 50 (maximum of 100)
    match "images/**.jpg" $ do
        route idRoute
        compile (compressJpgCompiler 50)

    -- Resize all profile pictures to 64x48
    -- Aspect ratio might be mangled
    match "profiles/**.jpg" $ do
        route idRoute
        compile (resizeImageCompiler 64 48)

    -- Scale images to fit within a 600x400 box
    -- Aspect ratio will be preserved
    match "images/**.png" $ do
        route idRoute
        compile (scaleImageCompiler 600 400)

    (...)

Take a look at the documentation for more usage examples.

If you would like a feature added, consider creating an issue on Github

Installation

From Hackage

hakyll-images is available on Hackage. Using the cabal-install tool:

cabal update
cabal install hakyll-images

From source

Building from source can be done using stack or cabal:

git clone github.com/LaurentRDC/hakyll-images.git
cd hakyll-images
stack install # Alternatively, `cabal install`

Documentation

The documentation for the latest release is available on the Hackage page.

Upcoming features

Here are the upcoming features of hakyll-images:

  • Format conversion

Support Issues / Feature requests

All support requests (e.g. installation issues, unclear documentation, bugs, etc.) should of filed on Github as an issue

License

This package is made available under the BSD 3-clause license. For more details, see the LICENSE.md