Questions tagged [mogrify]
16 questions
16
votes
7 answers
Use mogrify to resize large files while ignoring small ones
I'm running the following command:
mogrify -resize '400x400>' *.png
Notice the ">". Supposedly it will ignore smaller files, but although it doesn't resize them, it edits them (modification date and file size are changed).
Is there a way to make…
Mike
- 315
- 1
- 3
- 7
4
votes
0 answers
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 for nice output images.
I have a bunch of NEF…
yman
- 181
- 4
3
votes
2 answers
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 how would I loop through all the images, check…
pee2pee
- 183
- 2
- 6
2
votes
1 answer
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 files to current time. Is there any way to preserve…
Deepak Mittal
- 1,544
- 13
- 18
2
votes
2 answers
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 like it to only use files that were created on a…
please delete me
- 2,419
- 5
- 28
- 28
2
votes
2 answers
Convert a lot of .tif files using imagemagick's mogrify command
I have a lot of tif images in a directory. So I try to convert them into jpg format.
I use this command : mogrify -format jpg *.tif
But I get an error... an error for each image in fact:
mogrify: 2281.tif: unknown field with tag 37724 (0x935c)…
Raphaël
- 543
- 1
- 6
- 16
1
vote
1 answer
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 in vertical images that now have a vertical value…
visyoual
- 67
- 6
1
vote
2 answers
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/d11/d11e15a72e20e14c45bd2769d763126d-s.jpg
And I…
user260223
- 13
- 2
1
vote
1 answer
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 seconds
2.jpg: 6 seconds
3.jpg: 10 seconds
4.jpg:…
user
- 915
- 7
- 27
- 38
0
votes
1 answer
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?
Also can the command mogrify -strip be run on a…
0
votes
1 answer
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 directory and sub-directories 90 degrees clockwise (put…
cdahms
- 121
- 4
0
votes
1 answer
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 *.PNG && rm --verbose *.jpg *.jpeg *.JPEG *.JPG…
whitewings
- 2,377
- 7
- 32
- 53
0
votes
1 answer
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$'
find . -name "*.jpg" -exec mogrify -format png {}…
Dhillon
- 37
- 3
0
votes
1 answer
Resizing/Processing only images in folder larger than specified height?
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 resizing only images with a greater height.
This…
whitewings
- 2,377
- 7
- 32
- 53
0
votes
1 answer
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
While this one gives an error:
montage foo.jpg…
Jan Rüegg
- 151
- 1
- 2