Cut out black background from white and black image

Also, if I could find the median point of the opaque part of image, I could scale it to match my preferences, but the problem is I don’t know how to get the coords of this point