====== Dynamic Scaling with Aspect Ratio Maintenance ====== [ADDMORE: Add the code for Dynamic Scaling with Aspect Ratio Maintenance]