In the images.py file, add a resize_image Function: Resizes images based on different modes:
Mode 0: Resizes directly to the specified width and height.
Mode 1: Resizes to fill dimensions while maintaining aspect ratio and cropping excess.
Mode 2: Resizes to fit within dimensions while maintaining aspect ratio, filling empty space with image data.
In the images.py file, add a resize_image Function: Resizes images based on different modes: Mode 0: Resizes directly to the specified width and height. Mode 1: Resizes to fill dimensions while maintaining aspect ratio and cropping excess. Mode 2: Resizes to fit within dimensions while maintaining aspect ratio, filling empty space with image data.