Questions tagged [mogrify]

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.

Filter by
Sorted by
Tagged with
5 votes
2 answers
10k views

Decrease filesize when resizing with mogrify

I love the command line options of imagemagick. Mogrify is great to resize images and change quality, which is what I use most often. However, I have noted that the filesize if often larger than what ...
1 vote
2 answers
989 views

How to convert 32MB of PNG file to 200Kbs without losing its colors

I have couple of images that are of 32MBs of size and I want to change their size from 32MBs to 100Kbs or any KBs of size without affecting its colours. The commands I am trying are: muhammad@muhammad-...
2 votes
1 answer
576 views

Modify Multiple Images From Console [duplicate]

I know convert changes from one image format to another. mogrify can resize and scale multiple images also. But how can I modify all images inside a directory, including the sub-directories. Like for ...
7 votes
2 answers
5k views

Resize large images with mogrify (ImageMagick) but leave small images unaffected

Images can be resized using mogrify from the ImageMagick suite: mogrify -resize 256x256 *.jpg But this will resize images so that the largest dimension is 256px, including images that are smaller ...
0 votes
1 answer
1k views

How to create a bash script to create images from pdf file and then crop all of the *.png images to 1920x1080 (using mogrify)?

I want to create a bash script that can be executed from everywhere, that does this following: It creates images from a pdf file using pdftoppm: pdftoppm fileinput.pdf -png img -r 305.3 After all of ...
0 votes
1 answer
248 views

Extract option from mogrify

I recently discovered a command line picture editing tool Imagemagick which has a tool called mogrify. I would like someone to explain the -extract command (See here if you need reference) Let me ...
2 votes
1 answer
6k views

How can I convert all the images in a directory to jpg?

I have so many different images in a directory with sequential names 1 2 3 4 ... I was wondering if it was possible to convert all of them to jpg and resize them all to 900x900 without preserving ...
3 votes
1 answer
2k views

Removing the alpha channel from all the jpg images in a folder

How can I remove the alpha channel from jpg images automatically? I am using a deep learning code based on PyTorch that requires 3 channels but my images have 4 channels. I saw this answer but I do ...
3 votes
1 answer
2k views

How can I resize pictures changing the aspect ratio?

Currently running Ubuntu 15.04. I am trying to resize a set of photos where the original size of each is 3906*2602. Whether I try with darktable or mogrify specifying 1920*1080 I end up with 1621*...
5 votes
2 answers
1k views

Nautilus Image Converter: strip EXIF metadata

I just found out that images can have more than 20KB of EXIF data. Not really an issue with 2MB files, but if you have small thumbnails this really adds up. I use mogrify often to resize, and I can ...
0 votes
1 answer
2k views

batch "convert" into jpg with nice alpha flatten

I would like to batch resize and convert to jpg a few png files. But some pixels are transparent, and some are half transparent; I would like the transparent ones to be white, and the half-transparent ...
0 votes
1 answer
2k views

Difference between convert -sample and convert -geometry

I was making a small guide for facebook users on mogrify and convert ImageMagik subcommands, but I found that convert has -sample and -geometry options that for me look 99% the same. What is the ...