How to copy a Portion of an Image and Paste it into a Section of a PictureBox Control vwith PowerShell
This one has been a thorn in my side for a long time. As a matter of fact, it has stopped several projects while I figure it out. We are all familiar with the concept of selecting part of an image and then pasting that selection where we want. The problem that I have been facing is how to do that in code with PowerShell. I’m utilizing SAPIEN PowerShell Studio 2015 for a project involving images. I need to take parts of multiple images and assemble them into a single PictureBox control. Even my most beloved search engine was not helping me much. Let’s start off with making a copy of part of an image. To set this up I created a form with 3 PictureBox controls. The red box is P1, the green is P2, and the blue is P3. I colorized them so we can see what is going on in each as we progress through the code. Each PictureBox is 256, 256 in size. # Load the image into P1 $P1 .ImageLocation = "E:\PowerShell\InDev\Graphics1\a-0320.jpg" $P1 .Load() N