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.
Please allow one more question. In the StoragePath property of my ole picture field I used a dot (“.”) as path, so as to have the captured image stored in the same folder as the main file of the database that includes the field the ole is bound to – as it is indicated in this documentation. However, instead of doing so the captured image is systematically stored in the C:\UserName\Documents folder. Am I doing something wrong?
Current path in Access is set differently depending of the way you open the database. When you open it thru File-Open you get one result, when you open it from link or explorer – you get another.
Ok, thanks. I’ll work accordingly! Best.
Really it is fine.
Can you explain the scripting? I can insert and display the images within my database fine. But I can not copy them once they are in the database.
What am I missing?
Please tell me more, where are you trying to copy your images?
I may need to move or copy the pictures to a different application.
That is possible, but depends of details.
what’s the code to copy the image from the database and put it somewhere else ?
Just use SaveFile method.
More detailed here – https://access.bukrek.net/documentation
Can you use a ADF to scan multiple pages to one pdf?
Nope, that is not possible with AccessImagine.
We have successfully installed your program under access 97 and it is happily saving images as desired. We have added some code to check if the image already exists in a certain directory, and provided for multiple images associated with the same ID. We now notice that those images which have been viewed under access the program writes the jpg file into the My Documents directory (with a different file date)
Can you give me an example of how to scan without user assistance. ie. instant scan?
You can write at VBA:
Pic.InstantScan(1)
What are you trying to do?
Hello. I am storing thumbnails of external images in an SQL server 2012 table with a field type of image. Everything works properly. When I try to store the same data in a field of type varbinary(max) it fails. Microsoft will no longer support image in the future (SQL Server 2016+). Any suggestions? Thanks.
That is strange, AccessImagine works with VARBINARY fields.
You are correct sir! Tried it again and it works fine.
how to copy scanned image directly from accessimagine picturebox to another picturebox in c# ???
Maybe thats a bit late… You can access JPEG representation of image via Pic.Image
Hi!
At first – very good program :-) By now I’m using only demo, but I consider to buy full version.
I have one issue. I have some Access projects, that doesn’t need any pictures. But if I open this kind of MS Access files on computers, that only have Access runtime environment (with full MS Access is the same), the computer can not open file because of missing AccessImagine. I can’t / don’t want to install AcessImagine on every computer, so is there any possibility to switch off your plugin for unneeded files?
Looking forward to hearing from you :-)
Best regs
Jed
It looks like you have inserted AccessImagine into this projects, and then removed it. The reference to the library still remains.
Open VBA editor, go to Tools -> References and untick AccessImagine.
In my database the AccessImage is very small. It doesn’t fill up the field. Why does it do that?
You can stretch it. But you could place it inside the cell. You need to place it outside of any cells.
Hello! How to change the default photo filename “SCAN__.jpg” to other custom initial?
If you bind AccessImagine to some text/number unique field, it will be used as filenames source.
HI,
is there an way to center the copped image to the control? All cropped imaged are alligned to the left top corner…
many thanks
Werner
Nope, there is no such an ability.
This is a great object and displays picture files perfectly. Just one question how can you get GIF files to display in animated form?
Thank you! Animations are not supported.
OK thanks for the quick reply. It is a shame gif animation is not supported, this was just what I was looking for but I need to display the gif on an Access form in it’s animated state. I would definitely have purchased it immediately if it could. The only way I can see is with the WebBrowser object but it’s just so limited and the background cannot be changed to transparent which is what I need . Anyway Max, Thanks for your assistance. If you ever change the control or know of anything else please let me know. Thanks again for your work.
Hi Max – I have successfully run AccessImagine on one Windows laptop and it is exactly what I was after.
I am testing it on a second Windows laptop and I have run into an issue. It appears to be a compatibility issue with the Integrated Camera on the laptop. When I go to capture the image, it is solid white and a note at the top left corner says:
Unknown Compression
DataSize: 2764800 FourCC: MJPG
Any insight on what this is or how to fix it?
Many thanks,
I get a similar error. I am using a Logitech HD 720p USB webcam and get:
Unknown compression
DataSize: 816000 FourCC: MJPG
Perform right mouse button click at “Use Device” button and try to select another source.
Hi,
We have a database that has been working for 4 years (with ActiveX) and last week it stopped displaying two images (.jpeg) giving 2 types of errors:
1.) “not enough storage is available to process this command”
2.) “image can’t allocate the dib handle”
We have created a new database with ActiveX and it displays both .jpegs with no problems. Both .jpegs are similar in size.
Any advice or ideas as to what may have caused this and how we go about fixing it?
Hello. How can I check which version of AccessImagine is installed on a given computer? Thanks.
Hello. Sorry for the trouble with my previous question. I just found how to get the version number of AccessImagine. Control Panel / Programs and Features, and in the list the version number is displayed next to the app name. Sorry again. And thanks in any case.
it would be possible to capture the image, not save in OLE. Open the dialog box to save the image somewhere on the computer?
Yep, AccessImagine can be used without binding it to any field.
You can save image to any location with VBA:
Pic.SaveFile “c:\pics\my.jpg”
Me.Signature.Paste Is this the correct statement. it generated error Method or Data member not found
I usually use such VBA:
Signature.Paste
If i use the paste icon bottom left corner of the field it works. And clipboard content gets Pasted. if i use code me.signature.paste id does not work.
Please check if another VBA statements are working. For example, me.signature.scan
Hello,
I am new to Access VBA and testing AccessImagine. Do you have more documentation available which covers precise Syntax and usage with examples or a developers reference?
Any help will be appreciated.
Buck
Sorry, all I have is Documentation and Tutorials on this site.
Please write to max@bukrek.net if you have any questions.
nice work love it. but…
1.can you preview the image on the form control
2.i have 5mp webcam by default the plugin open the windows app when i need that to open my app that can use the 5mp
3. shortcuts keys well be nice for “sendkeys” method
in regards
1. Nope, that is not possible.
2. AccessImagine is not able to capture through the 3-party app. However, perform right mouse button click at “Use Device” icon and try to select your webcam.
3. Also you can use InstantScan method to capture image.
I scan images at 8.5 x 14 but I want to crop to 8.5 x 11. Please show me.
Please show me the VBA code.
Hi
is it possible to print the image saved on a report?
Do you have a timeout error setting on the InstantScan that I can set? I had a paper jam in the scanner and it locked up the system.
I’m sorry to say there is no such a setting in AccessImagine.
Hi Max, I noticed that your latest version allows us to use the Windows Camera App (which is great). Do you know if there is a way to open that camera and have it use the rear camera on the tablet vs. the front facing one?
Usually Windows Camera App has a button for that.
It looks something strange and iconic.
Thanks Max, yes it does have a button once the camera opens that lets you switch to the rear facing camera but it always opens first with the front facing camera and forces you to press the button to get to the rear one. No problem, I was hoping that there might be an option to have it automatically open to the rear facing one.
Tony
How do you paste an image and have the image save to external image?
With VBA? Like:
Pic.Paste
Pic.SaveFile “c:\my.jpg”
Hi Max. I had an older version of AccessImagine and tried to install the newer 1.74. I got an error message “The older version of AccessImagine ActiveX cannot be removed. Contact your technical support group”. I tried to uninstall from windows but it said that the source object was not available. How do I fix this problem? Do I need to edit the windows registry?
Yep, use this REG file – https://access.bukrek.net/down/forget_AccessImagine.reg
Hi, the storagePath does not work: tried with and without quotes. Tried running database local, on network, running from explorer or “file/open”…I have all permissions on any folder. Need urgent support, thanks
license under cob_externa@maua.br
Do you need to install AccessImagine on a windows tablet first or will it work by using a database file that already uses it?
You need to install AccessImagine first.
The version 173 has been working great.
I upgraded to version 174. But now I can open a report and see
my image but when I print it the image will not show.???
Any idea??
Also when I upgrade to ver. 174 do I need to redeploy the new AccessImagine174deploy.exe
to my customers.??
That is quite strange. Try to print to different printer or some PDF printer, will it print images?
You need to deploy new version to your clients to upgrade them. But they may continue to use previous version even when you use new one.
I did try to save as PDF and the same thing.
Have tried many computers and the same thing
I did try to save as PDF and the same thing.
Have tried many computers and the same thing
Please send me sample DB with non-printing image to max@bukrek.net
I already put it all back to version 173.
It’s all working good now.
I’ll just stay with this version 173.
Thanks
I guess I will go back to the 173 version.
it has been work good.
I went back to 173 version and updated all of my customers
and all is working great.
I don’t know what happened to version 174.
Hello,
I have version 174.
When I print to PDF from Access the picture doesn’t show up.
Could you let me know if there is a fix for this?
Max, I never heard back from you….
I have another comment…..
In a report the picture looks fine when in Report View but when I change to Print Preview, the picture totally loses clarity. I tested this in your sample database that comes with AccessImagine. Do you know why this happens & is there a fix for this?
Can AccessImagine display PDF files? If not, will a future release allow?
Nope, AccessImagine doesn’t work with PDF files and this is not planned in future.
Hi there, just a quick question:
Ism possible to Convert a Base64 to Image using your tool?
Nope (
It doesn’t seem to work in an Access 2016 report. There is no LoadFile(filename) property, only StoragePath.
LoadFile is not a property, it is the method that should be called from VBA.
I do not know what are you trying to do, but you can bind AccessImagine object to field or expression with filename and it will display it.
Where do I find the VBA code in the demo to test and integrate into my database?
There is no VBA code in the demo, just insert AccessImagine object and bind it to data source.
So I can not change the comments on mouseover?
Can not make any changes?
Yep, there is no ability to change comments on mouseover.
I never got a response from you Max……..I have found a solution to my post on June 18 2018
Sorry for that. I have asked several customers to give me some directions to reproduce the issue, but that was in vain.
Please tell us the solution!
Max, I managed to find a workaround that retains both the image on the PDF and preserves the quality of the image. I’ve also included code to attach the PDF to an email in Outlook if need be:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Dim fullPathToStoredFile As String
fullPathToStoredFile = “C:\Temp\” & “FileTitle” & Forms!yourformname!primarykeyID & “.pdf”
Dim db As Database
Set db = CurrentDb()
Dim Outlook
Dim rng
Dim OutApp As Object
Dim OutMail As Object
strRptName = “yourreportname”
DoCmd.OutputTo acOutputReport, strRptName, acFormatPDF, fullPathToStoredFile, False, “”, 0, acExportQualityPrint
DoCmd.Close acReport, strRptName, acSaveNo
strpath = “C:\Temp\”
strFile = Dir(strpath)
Outlook = Outlook + Attachments
Set OutApp = CreateObject(“Outlook.Application”)
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = “”
‘.CC = “”
‘.BCC = “”
.Subject = “your subject header”
‘.HTMLBody = “your details”
.Attachments.Add strpath & strFile
.Display
.Send
End With
I am having this same problem with my reports. The image shows up fine on the computer screen, but when I use Access’s Export to PDF function, the images disappear. I don’t understand VBA very well, so I am having trouble understanding the workaround proposed here:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Dim fullPathToStoredFile As String
fullPathToStoredFile = “C:\Temp\” & “FileTitle” & Forms!yourformname!primarykeyID & “.pdf”
I don’t have a C:\Temp that stores my files nor do I know where Access stores the tem[p files, so I don’t understand what this is trying to do. I don’t even know where I’d put this code. Would this be connected to a button? Any help would be very much appreciated.
I am running v 1.74. Is there somewhere I could download v 1.73 to see if that works?
Thanks for your help!
Hello!
Do AccessImagine support office 365?
Thank you in advance!
Yep, AccessImagine supports Office 365.
Sir
Is it work in MS Excel file or not?
Regards
No, it is not possible to use AccessImagine with MS Excel.
can the access imagine camera point to Bluetooth camera or phone?
No, AccessImagine can access only cameras that are usable in Skype.
I would like to use the scripting option InstantScan, so users will only have to click the icon/picture once to take their picture, currently I have it so they click the icon/picture and the buttons pop up then they click the camera then click in the camera app take picture. I see how to turn off the buttons but if i do that where do I put the code so users take the picture with one click. Where do I put scripting options code, and can I get example code for InstantScan option?
I figure it out, I put Pic.InstantScan(1) in the on got focus and it worked like charm, cant get any easier than that
Page, how did you use this? I keep getting a message that object is required and it highlights Pic.
Hi Max,
I am trying to set the StoragePath for an image object on opening the form it is on using the code below;
If DFirst(“txtCompany”, “tblLocalDefaults”) = “Chequers” Then
Me.[objPicture].StoragePath = “R:\Cleanflow\Images”
Else
Me.[objPicture].StoragePath = “R:\Renovo\Images”
End If
This isn’t being set and if I display the value to the screen it is displaying a FALSE
Am I missing something obvious here?
Many thanks in advance,
Neil
First of all, check if your code is executed at all with
MsgBox “Test”
Is there a function to yield size of bound image? something like me.[objpic].filesize?
Try to use Len(Pic.Image)
Hello, recently the MS-Access application I developed and that uses Accessimagine keeps crashing – about 5 to 8 times over a full work day use. It has been working fine without any problem for more than 4 years now! Here’s a text excerpt taken from the error screenshot that we manage to capture. The “Fault Module Name” apparently is the Accessimagine OCX (unless I am wrong). What could be creating this problem all of sudden? I uninstalled completely MS-Office 2013 and Accessimagine and reinstalled them anew, but the problem is still here. At present, I am thinking hard to try to understand what is going on. Any advice/suggestion? Thanking you.
Problem Event Name APPCRASH
Application Name MSACCESS.EXE
Application Version 15.0.4420.1017
Application Timestamp 50674523
Fault Module Name ACCESS~1.OCX
Fault Module Version 1.0.0.0
Fault Module Timestamp 5a030fe0
Exception Code c0000005
Exception Offset 00000000003acf8e
Will this work with access runtime only without a full installation of MS Access? Thank you.
Yep, AccessImagine works nice with Access Runtime.
After trying this for a while, It is really nice, I would have immediately bought the developer license IF it contains rotation and flipping capabilities on the fly, like the very nice cropping ability, please consider adding these features, it will make your product almost perfect.
Seems like the ScanSource does not work for me (MS Access 2010, Windows 10)
Run-time error ‘438’
I’m trying to connect multiple webcams to different objects, and select a specific source without having to choose from the dialog box using SelectSource
When I scan a full page, it shrinks it to a little over 1/4 the page and prints this way. I have tried to expand the object on the Access form, played with settings before scanning, etc. and nothing seems to work. Any ideas?
Have you got this fixed?
No not fixed yet.
Another question, a client got a new scanner Epson ES-60W and a new PC running windows 10 and we cannot get the scanning activex control to see the new scanner. Any idea what that could be? This scanner was working when they were using Window 7 and Access 2007.
Does this scanner works with WIA interface at that PC?
Seems the issue is MS Access 2010. If we use Access 2007 the control sees the scanner and all works. Do you know if it should work with Access 2010 so maybe something on my side is off?
Is did not specify height and width of an image and loaded 1000 images as BLOB into the database. The images are now very large and I need to reduce the size of them. How can I do that now after the images have been added?C
You can set the MaxWidth and/or MaxHeight and cycle through all records making
Picture0.Image = Picture0.Image
thank you so much for your reply. this worked perfectly!