![]() Wave_bible_bot/wave_bible_bot1_800圆00.png: PNG image, 800 x 600, 8-bit/color RGB, non-interlaced Wave_bible_bot/wave_bible_bot1_640x480.png: PNG image, 640 x 480, 8-bit/color RGB, non-interlaced Wave_bible_bot/wave_bible_bot1_1024x768.png: PNG image, 1024 x 768, 8-bit/color RGB, non-interlaced Wave_bible_bot/wave_bible_bot3.png: PNG image, 565 x 384, 8-bit/color RGB, non-interlaced Wave_bible_bot/wave_bible_bot2.png: PNG image, 515 x 428, 8-bit/color RGB, non-interlaced Wave_bible_bot/wave_bible_bot1.png: PNG image, 516 x 308, 8-bit/color RGB, non-interlaced It should work for all kinds of image formats supported by ImageMagick: $ file wave_bible_bot/* I tested the script with png files and it worked fine. I also sanitized the variables a bit, doesn't hurt. DSC01258_640x480.JPG, and use convert instead of mogrify since the files are actually renamed. convert.sh /path/to/directory # path is optional, it takes '.' as defaultĮdit: I edited the script to make sure to not override files when resizing, but rename them to e.g. # Remove the ! after $size if you do not wish to force the formatĬonvert -resize "$" # Use '.' (current directory) if no argument was passed ![]() # pass directory as first argument to the script Then you can make a little bash script to convert them to your 6 sizes: #!/bin/bash First, install it: $ sudo apt-get install imagemagick
0 Comments
Leave a Reply. |