Padding versus cropping
These are the only two ways to square a rectangle, and they trade against each other: padding keeps every pixel of the picture but adds area that was never photographed, while cropping keeps the frame full but throws away the ends of the longer side.
Neither option enlarges the image. Padding builds a square as wide as your longer side and centres the photo inside it; cropping builds one as wide as your shorter side and trims the excess equally from both ends. Both are lossless in the sense that nothing is rescaled.