Documentation

AccessImagine is ActiveX component to make storing images in various projects as easy as possible. It:
·supports JPEG, BMP, GIF and PNG  file formats
·stores images in JPG format to preserve space
·works with Access and other database applications
·generates previews in JPG and OLE format (for displaying in continuous forms)
AccessImagine design time options
These options are available in property inspector, when you design a form, report or application.
MaxWidth and MaxHeight
If the image exceeds this constrains, it is proportionally scaled down. This applies only when image is saved, preserving full image size for cropping.
StoragePath
If you like not to keep images in database, specify the location for them. In this case bind component to database field that is to hold image file names. Examples of valid pathes:
·“D:\MyWork\Images”
·“\\Avenger\Incoming\Pics” – local network path, useful for centralized storage
·“Pics” – subfolder in folder, where your database file is stored
·“.” – keep images in the same folder with database file
EmptyImage
You can select the appearance of control when it is empty. It can be a Contact sign, Photo sign of simple gray brick (None).
AccessImagine scripting options
Image
Represents picture in control, you can read and write it to manipulate with images.
Changed
Checks if image was changed from the last time this function was called.
PreviewJPG(Size) and PreviewOLE(Size)
These functions generate small previews of image in control. Size specifies the longest side of preview, if omitted it defaults to 64 pixels. If you need to save OLE previews along with your images,  insert this in Exit event procedure of AccessImagine object:
If <AccessImagine>.Changed Then <OLE preview field>.Value = <AccessImagine>.PreviewOLE
LoadFile(filename) and SaveFile(filename)
Use these functions for batch processing and advanced manipulating. SaveFile saves images only in JPG format.

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.

AccessImagine features:

  • 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.

Background

Specify the control background in hex form (i.e. 00000 is black and FFFFF is white)

Cropping

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

EmptyImage

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.

StoragePath

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:

  • D:\MyWork\Images
  • \\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

HideButtons

Set this to “Yes” if you don’t want to show the control buttons. It will look just like regular image this way.

OnClick

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

Scripting options

EmptyText

The text shown where there is no image (usually “No Image“). Can be set to empty string.

Image

Represents the picture in the control, both reads and writes are allowed.

ImageBind

Data bound to control (like ControlSource). Use it for late binding or if usual field binding is not available (i.e. at Access 97)

InstantScan (delay)

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).

Changed

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

LoadFile(filename)

Loads image from file or web (HTTP).  Supports JPEG, BMP, GIF and PNG  file formats.

SaveFile(filename)

Saves image to file.  Supports only JPEG format.

Scanning

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.

Copy

Copies current image to clipboard, making it possible to paste image into another application.

Crop X,Y,X1,Y1

Crops the image with the given coordinates rectange.

PicWidth and PicHeight

Return the bitmap image dimensions.

Paste

Inserts image from the clipboard.

Rename(filename)

Rename file in external storage. For that cases, when you need to overcome auto-generated names.

Scan

Aquire image from last used source.

ScanSource

Read/write property, id of image source, where -1 is WIA, -2 is TWAIN, -3 is Microsoft WDM, 0 and up – direct webcams.

SelectSource

Opens source selection dialog.

ShowFullPicture and ShowPanPicture and OpenPictureFile

Perform the corresponding action from OnClick property description.

247 Comments

  1. I’m trying to use ManyCam as image source (works with the Camera app W10). And I’having the following error message “Unknown compression DataSize: 4147200 FourCC: YUY2”

    Is there a way around it?

    Reply
    • Unfortunately, there is no fix.
      But you can use Camera App as image source (with AccessImagine 1.74)

      Reply
  2. I see there is a turn right and turn left property. Can these be added as on picture controls along with the other controls?
    Thanks,
    Rob

    Reply
    • No, but you can create your own buttons on form for rotating.

      Reply
  3. i am trying to use the ExportWithFormatting macro to export a report with AccessImagine images in it as a pdf. The report shows the images fine, but the PDF does not display the images. Is there any way to make this work either through the ExportWithFormatting macro or OutputTo and acFormat VBA? I really appreciate any help you can provide.

    Reply
    • Does the regular PDF export via menu works properly?

      Reply
  4. Is there a way to display and print an image in a report?

    Reply

Leave a Reply to Max D Cancel reply

Your email address will not be published.