GxImage |
The GX Image Control is a dedicated ActiveX control for displaying and handling images stored in gxImage structures.
In the GX ActiveX system the images drift from the sources to the image containers. For example an FXVD4 control is an image source, an ANPR control is an image holder. The GX Image control can be both source and container in the same time.
The connection between the sources and containers should be specified at initialization time. This is a permanent connection, that cannot be closed, but changing the source is permitted.
On runtime the sources send notifications to the containers when the source images are changed. If the AutoUpdateImage property is set the control automatically updates the image every time when the image source changed notification arrives. Refreshing the image shown inside of the control is controlled by the AutoRefresh property. In case of multiple operation on the source side it is recomended turning the AutoRefresh property in FALSE before starting the modifications and turning back to TRUE again at the end. This increases the applications response speed, because the internal images are not displayed.
If an image manipulation method (LoadImage, RotateImage) is called on the target side then the automatic image update will stop, even when the AutoUpdateProperty is set. This is a way for connection hangup. The connection is restored only when the UpdateImage method is called, and it is not influenced by changing the AutoUpdateImage property.
You have to lock the image object if you want to manipulate the pixels in the image and unlock at the
end of the image processing.
For example: mixing two image, filtering the image, making some effect on the image.
Use the LockImage/UnlockImage methods of the control to lock/unlock the
image object. If the image object is locked you can read the properties of the image (ImagePtr, Format, XSize, YSize, Sline, HRes, VRes, ImageObject)
and the view image (ViewPtr, ViewXSize, ViewYSize, ViewSLine) and using of the most properties and function of the
GxImage ActiveX is forbidden. If the image object is locked and the program hangs after changing a property or using a method of the GxImage control,
it is indicative of the property changing or method calling is forbidden.
If the image object is locked the locking thread can change the image, other threads cannot.
The precedence list of the display properties:
Note: To compile the samples in the SDK under Delphi please install the GxImage ocx to the Delphi ActiveX components as TGxImageOCX class.
The 64-bit ActiveX controls cannot be accessed in Visual Studio 2005 (VS2005) because the editor is a 32-bit program. Therefore in design mode the 32-bit ActiveX controls are used, but in runtime mode the .NET Framework 2.0 causes the built program to use the 64-bit ActiveX controls instead. If you develop a program in VS2005, you should use the 64-bit versions of the functions and properties whose names end with 64.
Note: In 32-bit programming a Long is a 32-bit integer value, an Integer is a 16-bit integer value; in 64-bit programming a Long becomes a 64-bit integer value, and an Integer becomes a 32-bit integer value. In this document a Long is a 32-bit integer value and a LongLong is a 64-bit integer value. In Visual Basic 8.0 (VS2005), the 32-bit Long parameters and properties are shown as Integer, and the 64-bit Long parameters and properties are shown as Long. In Delphi the 32-bit Long parameters and properties are shown as Integer, and the 64-bit Long parameters and properties are shown as OleVariant. In Visual C++ 6.0 the 64-bit versions of functions and properties of the ActiveX controls cannot be accessed. In Visual C++ 8.0 the GxImage ActiveX control cannot be loaded because the changed version number of the GxImage ActiveX control causes an unknown error, possibly a bug in Visual C++ 8.0.
Name | Description |
---|---|
![]() | Drawing modes |
![]() | Drawing styles |
![]() | File types for saving images |
![]() | Values of the format property |
![]() | Line styles |
![]() | Mirroring modes |
![]() | Values of the stretchmode property |
![]() | Values of the viewmode property |
Name | Description |
---|---|
![]() | This method clears the current drawing objects from the image. |
![]() | This method clears the current image. |
![]() | This method connects the control as an image container object to an image source object. |
![]() | This method changes the size and/or format of the control's image. |
![]() | This method copies the image to the clipboard. |
![]() | This method copies the actual view of the image to the clipboard. |
![]() | This method creates an image from an external (custom) source. |
![]() | This method draws a line between (x1,y1) and (x2,y2) points. The coordinates must be in image coordinates. |
![]() | This method returns the error code and string of the control. |
![]() | This method returns the error code of the control. |
![]() | This method returns the error string of the control. |
![]() | This method returns a binary value representing the control's class as an image source. |
![]() | This method gets an integer property of the GxImage module. |
![]() | This method gets a property of the GxImage module. |
![]() | This method returns a binary value representing the control's object as a source handle. |
![]() | This method mirrors the control's image horizontally. |
![]() | This method converts image coordinates to screen coordinates. |
![]() | This method converts image coordinates to screen coordinates. |
![]() | This method converts image coordinates to viewed image coordinates. |
![]() | This method converts image coordinates to viewed image coordinates. |
![]() | This method draws a line from the drawing cursor to the (x,y) point. The coordinates must be in image coordinates. |
![]() | This method loads an image from a memory buffer. |
![]() | This method loads the image from a specified file. |
![]() | This method lock the image of the control. If you want to manipulate the pixels of the image lock the image by calling the LockImage method. |
![]() | This method moves the drawing cursor to the (x,y) point. The coordinates must be in image coordinates. |
![]() | This method inserts an image from the clipboard. |
![]() | This method rotates the control's image. |
![]() | This method saves the image to a file. |
![]() | This method saves the view image to a file. |
![]() | This method converts screen coordinates to image coordinates (use for mouse event coordinates). |
![]() | This method converts screen coordinates to image coordinates (use for mouse event coordinates). |
![]() | This method converts screen coordinates to viewed image coordinates (use for mouse event coordinates). |
![]() | This method converts screen coordinates to viewed image coordinates (use for mouse event coordinates). |
![]() | This method sets an integer property of the GxImage module. |
![]() | This method sets the drawable area in one step. |
![]() | This method sets the zoom position in one step. |
![]() | This method unlock the image of the control. If youve finished the image manipulating unlock the image by calling the UnlockImage method. |
![]() | This method updates the image of the control by getting the image from the image source to which it is connected to. |
![]() | This method converts viewed image coordinates to image coordinates. |
![]() | This method converts viewed image coordinates to image coordinates. |
![]() | This method converts viewed image coordinates to screen coordinates. |
![]() | This method converts viewed image coordinates to screen coordinates. |
![]() | This method mirrors the control's image vertically. |
Name | Description |
---|---|
![]() | Occurs when the user presses and then releases a mouse button over an object. |
![]() | Occurs when the user presses and releases a mouse button and then presses and releases it again over an object. |
![]() | Occurs when the image of the ActiveX control is updated |
![]() | Occurs when the user presses a key while an object has the focus. |
![]() | Occurs when the user presses and releases an ANSI key. |
![]() | Occurs when the user releases a key while an object has the focus. |
![]() | Occurs when the user presses a mouse button. |
![]() | Occurs when the user moves the mouse. |
![]() | Occurs when the user releases a mouse button. |
Name | Description |
---|---|
![]() | This property enables/disables the automatic image redrawing when the image or the display parameters are changed. |
![]() | This property enables/disables the automatic resizing of the control's window to the size of its image. |
![]() | This property enables/disables the automatic image update from the connected source. |
![]() | The background color of the control. |
![]() | Adjusting view image brightness. |
![]() | Adjusting view image contrast. |
![]() | Mode for line drawing. |
![]() | Style for line drawing. |
![]() | [Read only] Image format. |
![]() | Adjusting view image gamma value. |
![]() | This property enables/disables the window of the control. |
![]() | Horizontal resolution. |
![]() | The horizontal coordinate of the zoom position when the view mode is vmZoom. |
![]() | The image converted to HBITMAP. Ability to copy an image as HBITMAP from the GxImage control. |
![]() | The image converted to HBITMAP for 64-bit developing. Ability to copy an image as HBITMAP from the GxImage control. |
![]() | [Read only] Handle for the image of the control. |
![]() | [Read only] Handle for the image of the control for 64-bit developing. |
![]() | [Read only] The image converted to OLE Picture. |
![]() | [Read only] Image pointer to the source image. |
![]() | [Read only] Image pointer to the source image for 64 bit developing. |
![]() | Parameter string given for the image source control when updating the image. |
![]() | Background color for line drawing. |
![]() | Pen color for line drawing. |
![]() | Line style for line drawing. The lsDash and lsDot style are visible only if LineWidth is 1, otherwise the line style should be set to lsSolid. |
![]() | Pen width for line drawing. |
![]() | Mirroring direction for displaying the image. |
![]() | Rotation angle (in degrees) for displaying the image. The permitted values are 0, 90, 180 and 270. |
![]() | Configures the ActiveX control for the runtime enviroment. |
![]() | Adjusting view image saturation. |
![]() | The quality of the JPEG image at saving. |
![]() | [Read only] The number of bytes in one image line. |
![]() | This property specifies whether the control should stretch the image to the control's whole area or to preserve the image's aspect ratio. |
![]() | Stretch method for displaying the image. The availbale values are defined in enumStretchMode enumeration. |
![]() | [Read only] The version of the GxImage ActiveX control |
![]() | [Read only] The view image converted to HBITMAP. |
![]() | [Read only] The view image converted to HBITMAP for 64-bit developing. |
![]() | View mode of the control. The available values are defined in the enumViewMode enumeration. |
![]() | [Read only] The view image converted to OLE Picture. |
![]() | [Read only] Image pointer to the image view. |
![]() | [Read only] Image pointer to the image view for 64 bit developing. |
![]() | [Read only] The number of bytes in one view line. |
![]() | [Read only] Image width of the view in pixels. |
![]() | [Read only] Image height of the view in pixels. |
![]() | Vertical resolution. |
![]() | The vertical coordinate of the zoom position when the view mode is vmZoom. |
![]() | The bottom side of the drawable area of the image when the view mode is vmPart. |
![]() | The left side of the drawable area of the image when the view mode is vmPart. |
![]() | The right side of the drawable area of the image when the view mode is vmPart. |
![]() | The top side of the drawable area of the image when the view mode is vmPart. |
![]() | [Read only] Image width in pixels. |
![]() | [Read only] Image height in pixels. |
![]() | The zoom ration when the view mode is vmZoom. |