5 minutes on: File management – Batch Convert PNG to JPEG Using ImageMagick

Опубликовано: 16 Февраль 2025
на канале: Sanning Arkitekter
7,651
95

This is a very brief 5-minute video on the basic procedure of using ImageMagick in Windows to batch convert multiple PNG images to JPEG images, with a lossy compression so as to significantly reduce the file size of the images. As such, the method shown is mostly relevant for screenshots and images of a purely referential nature, and should not be used for any directory where original artwork might be obscurely existing in any subfolder.

Timestamps:
0:05 Introduction to the example scenario
0:47 Download and install ImageMagick
1:13 Using Command Prompt and ImageMagick to batch convert images
3:29 Repeating the same command for all subdirectories
4:57 Deleting the original images

Make sure that, when searching for the original images in the given directory, the scope option "All subfolders" is selected, so as not to delete less or more original images than intended.

Links:
https://imagemagick.org/
https://imagemagick.org/script/downlo...

Command Prompt commands:

Change current directory to intended directory:
cd C:\Users\[YOURUSERNAME]\[YOURDIRECTORY]

Batch convert all PNG files in current directory to JPG:
magick mogrify -format jpg -quality 50 *.png

Batch convert all PNG files in subdirectories of current directory to JPG:
for /r /d %a in (*) do magick mogrify -format jpg -quality 50 "%~a\*.png"

The quality setting has a range between 0 and 100, with 100 being the highest quality.

Disclaimer:
This tutorial aims to increase student awareness of the versatility of the digital tools available for use within the context of the architectural education offered by KTH. As such, it might not be generally applicable, but on the other hand, if even one student is helped by it with fulfilling deliverables requirements, the purpose of this tutorial is satisfactorily achieved. There might be inaccuracies in this tutorial video – if you identify any significant one, please tell us in the comments.