All Projects → route → Mogrify

route / Mogrify

Licence: mit
Image processing in Elixir (ImageMagick command line wrapper)

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Mogrify

Gl4es
GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
Stars: ✭ 333 (-24.66%)
Mutual labels:  wrapper
Pytorch Custom Cuda Tutorial
Tutorial for building a custom CUDA function for Pytorch
Stars: ✭ 369 (-16.52%)
Mutual labels:  wrapper
Jsstore
A complete IndexedDB wrapper with SQL like syntax.
Stars: ✭ 430 (-2.71%)
Mutual labels:  wrapper
Three.phenomenon
⭐️ A tiny wrapper around three.js built for high-performance WebGL experiences.
Stars: ✭ 338 (-23.53%)
Mutual labels:  wrapper
Cuda Api Wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Stars: ✭ 362 (-18.1%)
Mutual labels:  wrapper
Go Dotnet
Go wrapper for the .NET Core Runtime.
Stars: ✭ 369 (-16.52%)
Mutual labels:  wrapper
Skeptick
Better ImageMagick for Ruby
Stars: ✭ 326 (-26.24%)
Mutual labels:  imagemagick
Govips
A lightning fast image processing and resizing library for Go
Stars: ✭ 442 (+0%)
Mutual labels:  imagemagick
Magick
Magic, madness, heaven, sin
Stars: ✭ 362 (-18.1%)
Mutual labels:  imagemagick
Scfacebook
The SCFacebook 4.1 is a simple and cleaner to use the api facebook-ios-sdk Objective-C Wrapper (https://github.com/facebook/facebook-ios-sdk) to perform login, get friends list, information about the user and posting on the wall with ^Block for iPhone. Suporte 4.71 FBSDKCoreKit, FBSDKShareKit and FBSDKLoginKit. Facebook SDK
Stars: ✭ 420 (-4.98%)
Mutual labels:  wrapper
Imageflow
High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
Stars: ✭ 3,643 (+724.21%)
Mutual labels:  imagemagick
Ffmpy
Pythonic interface for FFmpeg/FFprobe command line
Stars: ✭ 360 (-18.55%)
Mutual labels:  wrapper
Vips
Go Bindings for Vips (a super fast image processor)
Stars: ✭ 380 (-14.03%)
Mutual labels:  imagemagick
Stprivilegedtask
An NSTask-like wrapper around the macOS Security Framework's AEWP function to run shell commands with root privileges in Objective-C / Cocoa.
Stars: ✭ 335 (-24.21%)
Mutual labels:  wrapper
Globjects
C++ library strictly wrapping OpenGL objects.
Stars: ✭ 431 (-2.49%)
Mutual labels:  wrapper
Krabsetw
KrabsETW provides a modern C++ wrapper and a .NET wrapper around the low-level ETW trace consumption functions.
Stars: ✭ 330 (-25.34%)
Mutual labels:  wrapper
Sparqlwrapper
A wrapper for a remote SPARQL endpoint
Stars: ✭ 365 (-17.42%)
Mutual labels:  wrapper
Wasm Imagemagick
Webassembly compilation of https://github.com/ImageMagick/ImageMagick & samples
Stars: ✭ 442 (+0%)
Mutual labels:  imagemagick
Docker Aosp
🏗 Minimal Android AOSP build environment with handy automation wrapper scripts
Stars: ✭ 440 (-0.45%)
Mutual labels:  wrapper
Aspect Injector
AOP framework for .NET (c#, vb, etc)
Stars: ✭ 398 (-9.95%)
Mutual labels:  wrapper

Mogrify

Build Status

An Elixir wrapper for ImageMagick command line.

Documentation: https://hexdocs.pm/mogrify/

Requirements

You must have ImageMagick installed of course.

Installation

Add this to your mix.exs file, then run mix do deps.get, deps.compile:

  {:mogrify, "~> 0.8.0"}

Configuration

Configure the ImageMagick executable paths (optional):

Configure mogrify command:

  config :mogrify, mogrify_command: [
    path: "mogrify",
    args: []
  ]

Configure convert command:

  config :mogrify, convert_command: [
    path: "convert",
    args: []
  ]

Examples

Thumbnailing:

  import Mogrify

  # This does operations on an original image:
  open("input.jpg") |> resize("100x100") |> save(in_place: true)

  # save/1 creates a copy of the file by default:
  image = open("input.jpg") |> resize("100x100") |> save
  IO.inspect(image) # => %Image{path: "/tmp/260199-input.jpg", ext: ".jpg", ...}

  # Resize to fill
  open("input.jpg") |> resize_to_fill("450x300") |> save

  # Resize to limit
  open("input.jpg") |> resize_to_limit("200x200") |> save

  # Extent
  open("input.jpg") |> extent("500x500") |> save

  # Gravity
  open("input.jpg") |> gravity("Center") |> save

Converting:

  import Mogrify

  image = open("input.jpg") |> format("png") |> save
  IO.inspect(image) # => %Image{path: "/tmp/568550-input.png", ext: ".png", format: "png"}

Getting info:

  import Mogrify

  image = open("input.jpg") |> verbose
  IO.inspect(image) # => %Image{path: "input.jpg", ext: ".jpg", format: "jpeg", height: 292, width: 300}

Using custom commands to create an image with markup:

  import Mogrify

  %Mogrify.Image{path: "test.png", ext: "png"}
  |> custom("size", "280x280")
  |> custom("background", "#000000")
  |> custom("gravity", "center")
  |> custom("fill", "white")
  |> custom("font", "DejaVu-Sans-Mono-Bold")
  |> custom("pango", ~S(<span foreground="yellow">hello markup world</span>))
  |> create(path: ".")

Plasma backgrounds:

  import Mogrify

  %Mogrify.Image{path: "test.png", ext: "png"}
  |> custom("size", "280x280")
  |> custom("seed", 10)
  |> custom("plasma", "fractal")

Creating new images: See mogrify_draw for an example of generating a new image from scratch.

Changelog

See the changelog for important release notes between Mogrify versions.

License

Mogrify source code is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].