I need to resize rectangular images (400×600) into square images (600×600) while keeping aspect ratio of the original image. The newly added pixels need to be transparent. Like this. I need it in java or kotlin code. But if that’s not possible then I don’t mind a solution in any other language. I have not been able to find a