Index of value in binary image

Hello everyone,
I have a binary image made by 0 and 255 values. How can I get the minimum and max x and y related to the values equal to 255?

Good day Carla,

your problem appears to become a standard question…

Do a projection in x- and y-direction and extract the points in the 1D projections where the signals just deviate from zero. These four positions (if there is a single object in your image) give you the desired coordinates.