Viewing RAW files in Access - codec ? (1 Viewer)

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
I'm implementing an Access database to catalogue a load of old slides. I know there are other products out there which will do that, but a) I'm too tight to buy anything for this and b) I want the learning experience.

One of my main drivers here is that I want to store RAW files only (not jpegs), but I also want to associate keywords with the images.

I am initially photographing the slides using my Canon EOS 70D.

Windows 10 File Explorer is happy to display the thumbnails, so I assume that means I have the required codec. My Access application will display a .jpg file, but not a .cr2 one - does anyone have any ideas why that might be the case - and more importantly, how to resolve it ?
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
There are a myriad of image file formats, not all supported by Access or indeed by specialised image software

According to this article https://fileinfo.com/extension/cr2, cr2 files are based on the tiff format.

Unfortunately, I don't think tiff files are accepted either....????

Try renaming one as tiff and see if that does work.
If not, it's likely you will need to convert to a supported file format
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:01
Joined
May 7, 2009
Messages
19,169
acan you use the web browser control. it will open whatever its assiciation.
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
acan you use the web browser control. it will open whatever its assiciation.

Good point!
Just tested. You can also open tiff files using the standard image control in Access.
Not listed in the file format list, so select all files and browse to the file. Try that for your CR2 files as well.
 

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
Web browser control looks promising, though it opens the file in Photos, rather than on the form - which is not the end of the world, but not ideal. Also have to convert the file location to a URI, which will be cumbersome.
Having the CR2 file as the control source for a normal image control doesn't work.
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
Web browser control looks promising, though it opens the file in Photos, rather than on the form - which is not the end of the world, but not ideal. Also have to convert the file location to a URI, which will be cumbersome.
Having the CR2 file as the control source for a normal image control doesn't work.

Use an ActiveX web browser control and it can open local files within the browser window as long as there is a file handler app associated with it.

Surprised arnelgp didn't mention his own example file viewer based on this idea https://www.access-programmers.co.uk/forums/showthread.php?t=297837

OR try my image viewer app attached

Finally here's another link you may find useful https://www.lifewire.com/cr2-file-2620376
 

Attachments

  • Display large image of Thumbnail in a form.zip
    665.3 KB · Views: 155
  • FolderImages v3.zip
    138.1 KB · Views: 157
Last edited:

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
I don't have a problem displaying jpgs on Access forms, and I don't have a problem with converting cr2 files to jpgs (I just use the Canon DPP software), but I don't want to have to do that as a separate step for every image.

I really just want to get a thumbnail of the cr2 on an Access form. Given that Photos is the default app for the .cr2 file type, is arnelgp's approach the one I should pursue (this will take some study to understand) ?
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
If you do convert I would recommend avoiding the lossy JPEG format as Access doesn't handle it very well. BMP, PNG, GIF are all OK.

You can get converters that will manage multiple files at once e.g. all files in a folder

I can't say whether using an ActiveX web browser control is the best solution though it should work. I don't have any files in the format you are dealing with.

If you can upload a sample file, I'm willing to try it.
 

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
Colin - I cannot attach a .cr2 file as an upload as it's not a recognised file type, so I have sent one to the email address in your footer. But it's 25MB, so whether it gets through remains to be seen !
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
You could have zipped it!
No it hasn't come through by email - size limit is much less than that!

However, Access is very unlikely to cope with image files of 25 MB even if it's a recognised file type. So I think you will need to reduce the image dimensions which will also reduce file size
 

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
Aah, I think we might be at cross-purposes. The whole point of a RAW file (CR2 in Canon's case) is to capture the image as seen by the camera's sensor, so a 20 Megapixel sensor (as in the 70D) will result in 20MB data at 8-bit depth per pixel - and it can be up to 24 bits per pixel (one byte each for R, G and B).

It is the original file which I want to view, so if Access won't cope with that, I shall just stick with having it fire up MS Photos as a separate process. Which is OK, but I shall have to work out if I can get rid of the File Download dialog box and how to kill off that process when moving to view the next image.
 

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
I don't have a problem converting the images - Canon's software is well up to that task. It's viewing the original, preferably on an Access form, that's the issue - but from Ridders' post I take it that that will not be possible.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:01
Joined
May 7, 2009
Messages
19,169
what i mean is you can convert it first using code inside your form and set the Picture property if the image to the converted. then you can view the image.

there is an image codec from ms but unfirtunately it dies not support win 10 so i cannot test.
 

isladogs

MVP / VIP
Local time
Today, 23:01
Joined
Jan 14, 2017
Messages
18,186
The only way to find out is to try it and see.
If you do have to convert it then definitely avoid JPEG as you will lose lots of detail.
 

theseus

Registered User.
Local time
Today, 19:01
Joined
Aug 6, 2018
Messages
32
How many slides are you converting to put in your database? I have a 70D and don't use RAW often, because the size of the file is so large (24-25 MB). My concern is that with storing a RAW image and possibly a smaller JPG, you will have a massive database.



Just out of curiosity, why aren't you using a program like Lightroom or Bridge to manage your images?
 

BeeJayEff

Registered User.
Local time
Today, 16:01
Joined
Sep 10, 2013
Messages
198
How many slides are you converting to put in your database? I have a 70D and don't use RAW often, because the size of the file is so large (24-25 MB). My concern is that with storing a RAW image and possibly a smaller JPG, you will have a massive database.

Just out of curiosity, why aren't you using a program like Lightroom or Bridge to manage your images?

Probably a couple of thousand 35 mm slides altogether. I will not be storing any images within the Access db, but on an external drive, so a TB drive or bigger should be fine. I will only convert to jpg if and when I need to (many of them are of little interest and/or poor quality), but I want to tag them all and of course that cannot be done within the RAW file.

As to using Lightroom or Bridge, a) that costs money but mainly b) I'd like to exercise and extend my Access knowledge.
 

Users who are viewing this thread

Top Bottom