Hello. Spent some time on the ImageEnView.select method to calculate the center of an image with different zoom values. But I could not set the image selection area to the center. Please, tell me how to correctly calculate the center of the image to select an area of 100 by 100 pixels using ImageEnView.select and zoom 50...120. Thank you.
Hi Nigel. I'm sorry to trouble you. You can't just resize the selection. I decrease the size of the Y2 square selection by 1 pixel, and X2 is recalculated by 2.
begin with ImageEnView do begin SelectionBase := iesbBitmap; Select(SelX1,SelY1,SelX2,SelY2-1); end; end;
Hi Nigel. I'm trying to programmatically change the size of the frame of the selected area. Here is the code
...ButtonClick.... begin with ImageEnView do begin SelectionBase := iesbBitmap; Select(SelX1,SelY1,SelX2,SelY2-1); end; end; Checked with different Zoom 80 - 120.
The selected area frame changes normally using the mouse.