ImageGear Professional v18.2 > User Guide > Using ImageGear > Image Processing |
Once you have loaded an image into an IGPage Object (either by itself, or as part of an IGDocument Object), the other most common thing to do with it is to manipulate it.
The IGPage Object itself provides several methods for manipulating the image. In addition, there are several ActiveX controls that provide methods for modifying and manipulating the image in an IGPage Object. They are as follows:
Control Name | Usage/Function |
---|---|
IGProcessingCtl Control | Basic image processing (rotate, crop, etc.) |
IGEffectsCtl Control | Special effects processing (posterize, etc.) |
IGICCtl Control | Scanned image cleanup (remove red-eye, etc.) |
IGArtXCtl Control | Annotation and Redlining |
IGMedCtl Control | DICOM image display, manipulation and metadata |
The methods of these controls modify the image in an IGPage Object, but do not store the changed image - your application program must use one of the techniques described in Loading, Saving, and Acquiring Images section to save the changed image. |
Each type of image manipulation is done with the corresponding ActiveX control. The methods of that control modify the image contained within an IGPage Object.
As described in Operational Concepts, you use each of these controls by placing it into the UI of your application, using the graphic designer of your development environment. In the code for your application, in the startup sequence, you must associate the control with your IGCoreCtl Control, before calling any of its methods (this example shows IGProcessingCtl Control, but the technique is identical for IGEffectsCtl Control and the others):
Copy Code
|
|
---|---|
IGCoreCtl1.License.SetSolutionName "Accusoft"
IGCoreCtl1.Result.NotificationMode = IG_ERR_NO_ACTION
IGCoreCtl1.AssociateComponent
IGProcessingCtl1.ComponentInterface
|
Your application must then create an IGPage Object, and load an image into it. The following example shows the use of LoadPageFromFile Method, but any of the techniques in Loading, Saving, and Acquiring Images could be used:
Copy Code
|
|
---|---|
Dim page As IGPage
IGCoreCtl1.AssociateComponent IGFormatsCtl1.ComponentInterface
Set page = IGCoreCtl1.CreatePage
IGFormatsCtl1.LoadPageFromFile page, "myfile.jpg", 0
|
Your application can then modify the image, using any of the control's methods. For example, to rotate the image by 90 degrees, your application would execute the following statement:
Copy Code
|
|
---|---|
IGProcessingCtl1.Rotate90k page, IG_ROTATE_90 |
After modification, the image needs to be saved. Again, your application can use any of the techniques described in Loading, Saving, and Acquiring Images section.
The facilities provided by each of the controls are discussed in the following sections: