bellroy/elm-imgix - version: 1.0.0

for more information visit the package's GitHub page

Package contains the following modules:

elm-imgix

A wrapper around ImgIX image API for Elm

imgix logo

From imgix.com

Powerful image processing, simple API imgix transforms, optimizes, and intelligently caches your entire image library for fast websites and apps using simple and robust URL parameters.

Goal

The goal of this package is to supply a full comprehending API supporting all the available image configuration options made available by imgix.

ToDo

Usage example Simple

  ImgIX.fromUrl imageUrlWomen
      |> ImgIX.sizes
          [ ImgIX.Size.height 200
          ]


result example a

Usage example Advanced

  ImgIX.fromUrl imageUrlWomen
      |> ImgIX.sizes
          [ ImgIX.Size.width 200
          , ImgIX.Size.height 200
          , ImgIX.Size.fitFaceArea
          ]
      |> ImgIX.adjustments
          [ ImgIX.Adjustment.brightness 20
          ]
      |> ImgIX.rotations
          [ ImgIX.Rotation.flipHorizontal
          , ImgIX.Rotation.rotate 12
          ]
      |> ImgIX.stylizations
          [ ImgIX.Stylize.blur 20
          , ImgIX.Stylize.sepia 99
          ]
      |> ImgIX.pixelDensities
          [ ImgIX.PixelDensity.dpr 2
          ]
      |> ImgIX.format
          [ ImgIX.Format.q 60,
          , ImgIX.Format.lossless False
          ]
      |> ImgIX.automatics
          [ ImgIX.Automatic.fileFormat
          ]

result example b

Usage example Text

ImgIX.fromUrl imageUrlWomen
    |> ImgIX.sizes
        [ ImgIX.Size.height 380
        ]
    |> ImgIX.stylizations
        [ ImgIX.Stylize.blur 30
        ]
    |> ImgIX.adjustments
        [ ImgIX.Adjustment.brightness -50
        ]
    |> ImgIX.textOptions
        [ ImgIX.Text.text "Hello World 👍 !"
        , ImgIX.Text.alignCenter
        , ImgIX.Text.alignMiddle
        , ImgIX.Text.fontSize 100
        , ImgIX.Text.fitModeMax
        , ImgIX.Text.padding 40
        , ImgIX.Text.color (Color.rgba 255 255 255 0.8)
        ]

result example c