Hello,
you can check out the Image Crop module from the Marketplace. I'm not 100% sure that it will work but I think it will output a .png file after you do some manipulation with the image file in a microflow. Most solid way would be to create java action. There are plenty of examples on the web.