Skip to content

Latest commit

 

History

History
112 lines (92 loc) · 2.86 KB

README.md

File metadata and controls

112 lines (92 loc) · 2.86 KB

elm-imgix

ATTENTION: This is not the offical repository for this package. This is a convenience fork meant to be used until the bellroy package is updated.

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

  • Adjustment
  • Automatic
  • Blending
  • Border & Padding
  • Color Palette
  • Face Detection
  • Fill
  • Focal Point Crop
  • Format
  • Mask Image
  • Noise Reduction
  • PDF
  • Pixel Density
  • Rotation
  • Size
  • Stylize
  • Text
  • Trim
  • Typesetting Endpoint
  • Watermark

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