Skip to main content

Questions tagged [mogrify]

0 votes
1 answer
2k views

how to find all pics in a directory and its subdirectories and run a command on them

how to find all images in a directory and its sub-directories, with types gif, jpg, jpeg, png, ico, and run mogrify -strip your_filename.jpg on them? Can the command mogrify -strip corrupt an image? ...
stacking and exchanging woohoo's user avatar
-1 votes
1 answer
205 views

Using mogrify - case insensitive file search [duplicate]

I use mogrify as such: mogrify -monitor -quality 80 -resize 1200 *JPG However, this only matches files ending in .JPG. How do I include .jpg files at the same time (in other words, how to make the ...
user avatar
0 votes
1 answer
575 views

How to rotate all images 90 degrees in a directory and all sub-directories (using mogrify)?

I'm attempting to do as my question title indicates, here is my best attempt so far: find . -name '*.jpeg' -exec mogrify -rotate 90 '*.jpeg' {} + This seems to rotate the images in the current ...
cdahms's user avatar
  • 131
1 vote
1 answer
209 views

Can't rm formats after conversion

How can I fix the following command, so that all files with the format specified with the rm command are deleted? #!/bin/bash mogrify -verbose -format webp -quality 70 *.jpg *.jpeg *.JPEG *.JPG *.png *...
whitewings's user avatar
  • 2,527
1 vote
1 answer
531 views

How can I use mogrify to target a specific pixel value of the largest dimension so if vertical set height to 'x' or if horizontal, set width to 'x'

So I've successfully used $ mogrify -resize 3000 to accomplish setting dimension on batches of images. What this yields me is exactly that- a group of images that have a 3000px width. The issue lies ...
visyoual's user avatar
  • 167
2 votes
3 answers
4k views

Preserve image's modification time with mogrify/imagemagick

I have a huge collection of family photos which I don't really need full resolution of. I want to use mogrify but I tried it on a sample set of images and it seems that it sets modification time of ...
Deepak Mittal's user avatar
0 votes
1 answer
752 views

Find gif/jpeg files with png extension and convert to png

First command find and list jpeg/gif files with png extension. Second command convert a file to png. find . -type f -name "*.png" | xargs -L 1 -I{} file -i {} | grep -v 'image/png; charset=binary$' ...
Dhillon's user avatar
  • 37
3 votes
2 answers
558 views

Loop through files and convert BMP files to JPG

I have a folder of images. All have the JPG extension but when running file against a few, they're coming back as bitmap e.g. 25818.jpg: PC bitmap, Windows 3.x format, 357 x 500 x 24 My question is ...
pee2pee's user avatar
  • 193
4 votes
0 answers
950 views

Convert NEF to JPG with optimal brightness

There are multiple tools for converting Nikon raw images (.NEF) to JPEG, as well as there are multiple discussions on this topic (e.g. Converting .NEF to .JPG). My question regards optimal settings ...
yman's user avatar
  • 181
2 votes
2 answers
693 views

How do I use mogrify convert only on files with a certain creation date?

I'm creating an animated gif using mogrify's convert. However, at the moment I run in on a folder with dozens of images in it, and I just instruct it to use all of the images it finds. However, I'd ...
please delete me's user avatar
1 vote
2 answers
742 views

Find files with 32 character long recursively in a directory and apply a command

I have folders and files looks likes this: /thumbs/6b0/6b029aab9ca00329cd28fd792ecf90a.jpg /thumbs/6b0/6b029aab9ca00329cd28fd792ecf90a-s.jpg /thumbs/d11/d11e15a72e20e14c45bd2769d763126d.jpg /thumbs/...
user260223's user avatar
0 votes
1 answer
1k views

Resizing/Processing only images in folder larger than specified height? [duplicate]

I have a folder with JPG images, some of which have a height dimension larger than 1900 pixels. I need a command that will ignore the images with a height dimension lower than 1900 pixels, while ...
whitewings's user avatar
  • 2,527
0 votes
1 answer
601 views

Imagemagick mogrify with shadow geometry

How can I specify the size of a shadow with imagemagick? This command works: montage foo.jpg bar.jpg foobar.jpg -background lightgray -geometry 1031x1642+57+57 -shadow -monitor -tile 3x1 out.png ...
Jan Rüegg's user avatar
1 vote
1 answer
2k views

How to create a timed video from still images with specific time between each image?

I want to create a video from still images. My images are: 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg Each of them I want to show for a specific duration, between 1-10 seconds: 1.jpg: 2 ...
user's user avatar
  • 1,075
18 votes
8 answers
16k views

Use mogrify to resize large images while ignoring small ones

I'm running the following command: mogrify -resize '400x400>' *.png According to the docs, the "widthxheight>" geometry (with > at the end) "Shrinks an image with dimension(s) ...
Mike's user avatar
  • 335

15 30 50 per page