Hi
I have below code Width = 50000,Height = 28000 . I want centre of this Picture to be saved or display in another Picture
Picture1.AutoRedraw = True
Picture1.Picture = LoadPicture(App.Path & "\O_" & tno & ".jpg")
Picture1.Width = Picture1.Picture.Width
Picture1.Height = Picture1.Picture.Height
Thanks
Sangeetha SPosted Mar 27, 2025, 6:22 AM
To save or display the center of the picture in another picture, you can use the
PaintPicturemethod to copy the central portion of the image. Here's an example of how you can achieve this:Daniel WrightPosted Mar 21, 2025, 10:36 AM
Based on the information provided, it seems like you are looking to work with images and extract/display the center of an image in another picture.
To achieve this, you can determine the center of the image based on its dimensions (Width = 50000, Height = 28000) and then capture or display that center in another picture.
Here is an example of how you can modify the code snippet you shared to achieve this:
In this code snippet:
- We calculate the center of the original image.
- We create a new PictureBox object (Picture2) where we will display the center of the original image.
- We use the `PaintPicture` method to extract the center of the original image and display it in Picture2.
- Finally, you can save the resulting center image if needed.
Please customize the code further based on your specific requirements and the tools you are using, as this is just a conceptual example. Let me know if you need more specific guidance or have any other questions!