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.

Warning! Never do not copy-paste AccessImagine object, it gets broken. Always insert new AccessImagine object through Insert ActiveX Control.

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.

370 Comments

  1. Hi Max, I moved my database to a new computer and now have a problem with AccessImagine: It is no longer possible to copy a file into the control using drag & drop. However, copying (in the browser or in the MS Photo app) and pasting into the control works. Do you have any idea what the cause is?
    The current environment is
    Windows 11 Pro, version 24H2, build 26100.2314, Windows Feature Experience Pack 1000.26100.32.0
    MS 365 Apps for Enterprise
    MS Access for MS 365 MSO (version 2411, build 16.0.18227.20002) 64 bit
    AccessImagine version 1.73 (version 1.74 also doesn’t work)

    Reply
      • Thank you, unfortunately this fix does not change the behavior.

        Reply
        • Yep, unfortunately it is not working anymore.
          Sorry, I do not have any fix for this (

          Reply
          • Hi Max, thank you very much. It has been a pleasure to use the AccessImagine Control for many years. I am very sorry to have to look elsewhere. Please let me know if there is any news for a future with your Control. All the best and maybe see you later.

  2. Hi Max
    I would like to know if it is possible to resize images using your control while maintaining the proportion by choosing the height and width in percentage or number of pixels?
    thanks

    Reply
    • Sure, just specify MaxWidth and/or MaxHeight and image will be scaled down maintaining the proportion.

      Reply

Submit a Comment

Your email address will not be published.