I'm trying to convert multiple .tif
files into .png
files using Imagemagick on the Windows command line. I tried the following, which didn't work:
convert -format tif *.png
I then tried a loop
for %a in (*.tif) do convert %a %a.png
which did work but now all my images are named as [something].tif.png
, which is annoying.
So why didn't the first command work, and if there's no way to get the first command to work, is there a way to improve the second command so I won't have to deal with the .tif
in the .png
image name?
Edit It seems that I got the first command wrong. First of all, convert
doesn't work but mogrify
does. I had read that mogrify replaced the files of the old format, but apparently it isn't true because it created new images for me without deleting the old ones. Secondly, it seems that the destination file type comes first, so the command is
mogrify png *.tif
which works perfectly.
I'd still like to know how the second command could be improved.
Some of the advantages GraphicsMagick has over ImageMagick include more efficiency, a smaller size, fewer security exploits and is generally more stable than ImageMagick.
FFMPEG and ImageMagick can be categorized as "Image Processing and Management" tools. AmperVue, Mux, and AbemaTV are some of the popular companies that use FFMPEG, whereas ImageMagick is used by Swingvy, Cloud Drive, and Sotong Kitchen.
Why don't you use mogrify
?
mogrify -format tif *.png
will create 1.tif
from 1.png
... N.tif
from N.png
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With