Mogrify is a tool from the imagemagick suite of programs and performs many actions such as resize and convert upon image files. In contrast to convert, another imagemagick tool, mogrify overwrites original image files.
Questions tagged [mogrify]
141 questions
4
votes
1 answer
How to add suffix to mogrify - imagemagick
I'm running this command to create thumbnails with mogrify and it works great!
#! /bin/bash
mogrify \
-resize 300x300 \
-crop 200x200+0-20 \
-gravity center \
-format jpg \
-quality 100 \
-path thumbs \
…

Mensur
- 457
- 9
- 28
4
votes
2 answers
How to make SVG to PNG rendering with MiniMagick not ignore size and font options?
I'm using minimagick to do some dynamic resizing of a SVG image into a PNG one.
Here is my code:
require "mini_magick"
svgString = ''\
'
4
votes
2 answers
php exec() returning empty value
Currently my goal is to use see the output of PHP exec() but getting an empty value. Am using firephp (firebug extension) logging and can't figure out why it is empty.
full code here:…

docodemore
- 1,074
- 9
- 19
3
votes
3 answers
ImageMagick - Remove black borders
I have about 100 scanned pictures (.jpg), all with black borders (top/right/bottom/left), like this:
input.jpg
I want to trim my picture automatically, that it is without ANY black border.
I tried different codes, the best result I get with this…

SueSchi
- 51
- 1
- 4
3
votes
2 answers
Convert images which have the same names but different extensions
For example, I have two files:
aaa.jpg (with cat)
aaa.png (with dog)
As you can see, images are different, despite of their names, which are the same.
I want to convert both these images to one single format.
The basic attempt for…

user90726
- 939
- 1
- 8
- 28
3
votes
2 answers
Setting image orientation exif data using imagemagick
I have a set of images with corrupt exif orientation data. I would like to change the orientation of these images using imagemagick. I found the following command mogrify -set "%[EXIF:Orientation]" BottomRight image.jpg but it does not seem to work…

Pablo Jomer
- 9,870
- 11
- 54
- 102
3
votes
1 answer
ImageMagick Mogrify: batch with watermark
I have a strange probleam with running ImageMagick mogrify on several files. I use conversion string to make several transformation on images, which results in thumbnails. The command with the conversion string runs fine on single file, however when…

Martin Lazar
- 1,330
- 16
- 24
3
votes
2 answers
ImageMagick: how to batch combine multiple TIFF file to a single TIFF file in a directory?
I have 600 TIFF files in a directory, c:\temp.
The file names are like:
001_1.tif,
001_2.tif,
001_3.tif
002_1.tif,
002_2.tif,
002_3.tif
....
....
200_1.tif,
200_2.tif,
200_3.tif
The combined files should be placed in same directory and the files…

Arijit Roy
- 41
- 1
- 3
3
votes
1 answer
Scale images to desktop size with no borders with Imagemagick
I have a bunch of images that are desktop wallpapers, but different sizes. For my examples, I will use the resolution 1920x1080. How do I scale the images so that:
For images smaller than my screen in width and height, the image is centered and…

stonewareslord
- 343
- 2
- 13
3
votes
1 answer
Batch convert/resize different image formats to JPEG of certain resolution with ImageMagick
How do I use mogrify to batch-convert a ton of files (.TIF, .EPS, .JPG but most annoyingly of all-) .PSD files and only keep their first layer?
I found a solution on how to convert all images, but I kept getting filenames in my output-directory…

Henry van Megen
- 2,159
- 2
- 23
- 35
3
votes
2 answers
imagemagick mogrify cut part of image out
If I have an image similar to this:
---------------------------------
- xxxxxxxxxx -
- x x -
- xxxxxxxxxx -
---------------------------------
How can I use mogrify to cut out just the…

Jared Eitnier
- 7,012
- 12
- 68
- 123
2
votes
2 answers
Why imagemagick mogrify command not found and how to solve this?
I'm trying to write automation service that gets all images exclude .jpg from the current directory (or selected files), convert them to .jpg by imagemagick mogrify and delete old images.
script: mogrify -format jpg *.* && find . -type f ! -name…

Lirrr
- 377
- 1
- 2
- 6
2
votes
0 answers
ImageMagick v7 conversion of 8bpp images
On Windows 10, I need to crop and resize whole folders of images.
Following the documentation and some answers here i've built this batch:
magick mogrify -path ./cropped -crop 1300x1940+85+130 +repage -resize "800x800^" *.jpg
It mostly works, but…

Parduz
- 662
- 5
- 22
2
votes
1 answer
Image compression using Image Magick mogrify problems
Im not an expert in this field at all. Im trying to re-size batch images from the web and for the most part it is working great. I am running into images that are huge in size and re-sizing and compressing through mogrify just isnt working.
Ive…

kgibbon
- 726
- 1
- 15
- 37
2
votes
1 answer
How to append a same image to multiple images using imagemagick
Hello I want to add a same image to the left side of multiple images. First image is a legend and it common for all the 6 images which I later want to montage 3x2.
I tried this command below before montaging and it did not work. I wanted to see if I…

ash
- 117
- 8