All Projects → elixir-mogrify → mogrify

elixir-mogrify / mogrify

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

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to mogrify

Imagick
Go binding to ImageMagick's MagickWand C API
Stars: ✭ 1,269 (+141.71%)
Mutual labels:  imagemagick
Php Legofy
Transform your images as if they were made out of LEGO bricks.
Stars: ✭ 161 (-69.33%)
Mutual labels:  imagemagick
crymagick
A crystal wrapper for ImageMagick command line.
Stars: ✭ 37 (-92.95%)
Mutual labels:  imagemagick
Maim
maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Stars: ✭ 1,758 (+234.86%)
Mutual labels:  imagemagick
Magick.net
The .NET library for ImageMagick
Stars: ✭ 2,071 (+294.48%)
Mutual labels:  imagemagick
Grim
Tool for extracting pages from pdf as images and text as strings.
Stars: ✭ 208 (-60.38%)
Mutual labels:  imagemagick
Optimise Images
Batch image resizer, optimiser and profiler using ImageMagick convert, OptiPNG, JpegOptim and optional ZopfliPNG, Guetzli and MozJPEG.
Stars: ✭ 64 (-87.81%)
Mutual labels:  imagemagick
TGImage
一款以最新潮的方式来使用UIImage的swift插件
Stars: ✭ 18 (-96.57%)
Mutual labels:  imagemagick
Urxvtconfig
A graphical user interface tool for configuration of the rxvt-unicode terminal emulator.
Stars: ✭ 155 (-70.48%)
Mutual labels:  imagemagick
maptiles
Map tile generator. Converts an image into map tiles using ImageMagick. Map tiles can be used in Google Maps, Leaflet and other map rendering software.
Stars: ✭ 52 (-90.1%)
Mutual labels:  imagemagick
Setup
Setup a new machine without sudo!
Stars: ✭ 130 (-75.24%)
Mutual labels:  imagemagick
Nuxt Image Loader Module
An image loader module for nuxt.js that allows you to configure image style derivatives.
Stars: ✭ 135 (-74.29%)
Mutual labels:  imagemagick
Lsix
Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.
Stars: ✭ 2,635 (+401.9%)
Mutual labels:  imagemagick
Pgmagick
pgmagick is a yet another boost.python based wrapper for GraphicsMagick/ImageMagick.
Stars: ✭ 100 (-80.95%)
Mutual labels:  imagemagick
Neural-Tile
A better tiling script for Neural-Style
Stars: ✭ 35 (-93.33%)
Mutual labels:  imagemagick
Qtfm
Qt File Manager
Stars: ✭ 73 (-86.1%)
Mutual labels:  imagemagick
Googliser
a fast BASH multiple-image downloader
Stars: ✭ 202 (-61.52%)
Mutual labels:  imagemagick
pdf-thumbnail
npm package to create the preview of a pdf file
Stars: ✭ 23 (-95.62%)
Mutual labels:  imagemagick
magick-wasm
The WASM library for ImageMagick
Stars: ✭ 259 (-50.67%)
Mutual labels:  imagemagick
Node S3 Uploader
Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
Stars: ✭ 237 (-54.86%)
Mutual labels:  imagemagick

Mogrify

Build Status Module Version Hex Docs Total Download License Last Updated

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:

def deps do
  {:mogrify, "~> 0.9.2"}
end

Configuration

Configure the ImageMagick executable paths (optional):

Configure mogrify command:

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

Configure convert command:

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

Configure identify command:

config :mogrify, identify_command: [
  path: "magick",
  args: ["identify"]
]

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}

Getting reduced info in a "lighter" way (uses less memory):

import Mogrify

info = identify("input.jpg")
IO.inspect(info) # => %{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.

Copyright and License

Copyright (c) 2014 Dmitry Vorotilin

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].