Typically the FormFix component will be used to create field clips, however there may be some scenarios where there is a desire to not use FormFix. In these cases, FormDirector’s Field class provides the functionality to create field clips.
Input and Output Data
- Original Form Image - An original form image can be obtained by FormDirector from a TemplateImage, from a file using ImagXpress, of from another forms processing component which can load images in memory.
- Field Location - A Field object contains location references and all associated attributes to define a single rectangular region on a form image.
- Field Clip - A Field Clip is the copied image pixels of the rectangular Field region.
Create Field Clips
- Load the original form image into memory using one of the means described above. If a FormDefinition object exists that represents the given form, the suggested means of loading the image is by using one of TemplateImage’s properties: Bitmap, Hbitmap, Hdib, or Image.
- Extract the location of the field from the Field object’s Location property.
- Call the appropriate method of the Field class to generate the field clip.
Method |
Description |
ClipBitmap |
Copies the specified location of pixels from the full page bitmap image to a new field clip. |
ClipHbitmap |
Copies the specified location of pixels from the full page Hbitmap image to a new field clip image. |
ClipHdib |
Copies the specified location of pixels from the full page Hdib image to a new field clip. |
ClipImage |
Copies the specified location of pixels from the full page image to a new bitmap field clip image. |
See Also