This code is for beginners to use, we refer to a lot of code on the Internet, thank the predecessors for their contributions.
The goal of this code is to modify the resolution of all the pictures to 128*128. While modifying the images, it will not elongate them, but supplement the deformed part by filling pure white（any color can be fill by change RGB）, which is conducive to the training of GAN.
The code is python, can be copied later debugging use.
Thanks for xinggui.
The last part 【cut_images('F:/date/JPG128enhance/', 'new', 128, 128)】is the target folder you want to enhance.
And 128 represents the image resolution that needs to be modified. For example, 128, 128 represents a picture with a resolution of 128*128, if you need other picture resolutions, you can modify it yourself.
The way for beginners to use is to copy this code into vscode, modify the address of the target directory, save it as a .py file, and then click the small triangle in the upper right corner to run the code.