How could you used this command
mogrify -format jpg *.png
But to only mogrify png images that were created or modified after a certain date for example yesterday or a few days ago etc? Would you use the identify command, what would the syntax be when added to the above mogrify command? Can you chose either modified or created?
Newbie using the latest Ubuntu.
Command to Mogrify png images created or modified after a certain date only?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Command to Mogrify png images created or modified after a certain date only?
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Mogrify has no filter for date. So move all the images that conform to your date into a new folder and then use mogrify on that folder.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Mogrify has no filter for date. So move all the images that conform to your date into a new folder and then use mogrify on that folder.
Re: Command to Mogrify png images created or modified after a certain date only?
It's
ImageMagick 6.9.7-4 Q16 x86_64 20170114
with Ubuntu 18.04.
I thought since it was the most recent standard version of Ubuntnu everyone would be using the same one or at least know which one it has.
So there's no way to select only today's images for example?
ImageMagick 6.9.7-4 Q16 x86_64 20170114
with Ubuntu 18.04.
I thought since it was the most recent standard version of Ubuntnu everyone would be using the same one or at least know which one it has.
So there's no way to select only today's images for example?
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Command to Mogrify png images created or modified after a certain date only?
You'll have to use one of your system utilities like "find" to locate the files that meet your criteria. Redirect the output of the "find" command to a text file to use as your list of files to process. Then you can read that text file into "mogrify" using the "@" flag. I'm not at a *nix machine to test, but this command should work as a simple example...
Code: Select all
find *.png -mtime -1 > list.txt
mogrify -resize 50% @list.txt
Re: Command to Mogrify png images created or modified after a certain date only?
Great I tested it and it works. Thanks.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Command to Mogrify png images created or modified after a certain date only?
Your version
by version is ancient. By patch date, 1/14/2017, it is over a 1 1/2 years old. Check with your Linux distro to see if there is more current patch.ImageMagick 6.9.7-4 Q16 x86_64 20170114
Re: Command to Mogrify png images created or modified after a certain date only?
I installed it from synaptic using standard Ubuntu 18.04 updated with latest updates.