B
B
BadCats2018-06-12 12:05:04
C++ / C#
BadCats, 2018-06-12 12:05:04

Top left corner of image c#?

public void CreateSquare(int w, int h)
        {
            // нарезка изображения на квадраты типа bmp
            Rectangle REct = new Rectangle(X, Y, w, h);
            Bitmap bmpSquate = (Bitmap)bmp.Clone(REct,System.Drawing.Imaging.PixelFormat.DontCare);
        }

There is a source image of bmp type and it needs to be cut into squares. To do this, I clone the original image with a new rectangle area, giving its width and height as parameters accepted by the method. But how to get the coordinates of the top left corner of the original image? (The ones that are X and Y)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor P., 2018-06-12
@Jeer

Zero zero like what to get them

L
LiptonOlolo, 2018-06-12
@LiptonOlolo

The coordinates start from the upper left corner, not from the middle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question