AccessImagine is ActiveX component for storing images in various projects as easy as possible. You need to place it on form while designing your application and bind to some database field.
- JPEG, BMP, GIF and PNG file formats support
- store images in JPEG format to save space
- get images from TWAIN and WIA devices
- get images from video sources (including webcams)
- paste image from any Windows application
- in-place image croping tool
- HTTP images display
- OLE fields support
- previews in JPEG and OLE formats (for displaying in continuous forms)
- external image storage
- on-click big image display
Design time component properties
These options are available in property inspector, when you design a form, report or application.
Specify the control background in hex form (i.e. 00000 is black and FFFFF is white)
Cropping type selection:
- Proportional – cropping tool keeps control’s proportions
- Normal – crop any proportions
- Auto – images are automatically cropped to control’s proportions on insertion
You can select the appearance of control when it is empty. It can be a Contact sign, Photo sign or simple brick (None).
MaxWidth and MaxHeight
If the image exceeds these constrains it will be proportionally scaled down. This applies only when image is saved while preserving full image size for cropping.
In order not to keep images in database you need to specify a location for them. Bind component to database field which holds image file names in this case. Examples of valid locations’ paths:
- “\\Avenger\Incoming\Pics” – local network path (for centralized storage, etc.)
- “Pics” – a subfolder in the folder, where your database file is stored
- “.” – keep images in the same folder with the database file
If empty.jpg image is present at StoragePath location, it will be used for empty control display
Set this to “Yes” if you don’t want to show the control buttons. It will look just like regular image this way.
You can select the control’s behaviour when the user clicks the image.
- None – do nothing
- ShowFullPicture – show picture in new window, scaling it down to fit the screeen, if it is too big
- ShowPanPicture – show picture in new window 1:1 size, giving the ability to pan via a hand tool
- OpenPictureFile – open picture with the external application, that is associated with JPG filetype
The text shown where there is no image (usually “No Image“). Can be set to empty string.
Represents the picture in the control, both reads and writes are allowed.
Data bound to control (like ControlSource). Use it for late binding or if usual field binding is not available (i.e. at Access 97)
Makes instant scanner/webcam image capture without user’s assistance. Will wait delay seconds after device initialization before taking image (it may be needed for some cams that adjust focus/brightness at first few seconds).
Checks if image has been changed since the last invocation of this function.
PreviewJPG(Size) and PreviewOLE(Size)
These functions generate small previews of the image in control. Size specifies the longest side of the preview, if omitted it defaults to 64 pixels. If you need to save OLE previews along with your images, add the following code to Exit event procedure of the AccessImagine object:
If <AccessImagine>.Changed Then <OLE preview field>.Value = <AccessImagine>.PreviewOLE
Loads image from file or web (HTTP). Supports JPEG, BMP, GIF and PNG file formats.
Saves image to file. Supports only JPEG format.
Set to 0 to disable Use device button. Set to 1 to activate instant image capture without any dialogs.
TurnRight and TurnLeft
Rotates image 90 degrees clockwise and anti-clockwise.
Copies current image to clipboard, making it possible to paste image into another application.
Crops the image with the given coordinates rectange.
PicWidth and PicHeight
Return the bitmap image dimensions.
Inserts image from the clipboard.
Rename file in external storage. For that cases, when you need to overcome auto-generated names.
Aquire image from last used source.
Read/write property, id of image source, where -1 is WIA, -2 is TWAIN, -3 is Microsoft WDM, 0 and up – direct webcams.
Opens source selection dialog.
ShowFullPicture and ShowPanPicture and OpenPictureFile
Perform the corresponding action from OnClick property description.