Question Ebmbedding JPEG images

andy_25

Registered User.
Local time
Today, 22:27
Joined
Jan 27, 2009
Messages
86
Hi,

I have a database which has 400-500 entries for a particular product I sell. I would like to add pictures of these products. I have added an OLE object field to my table for the purpose of storing an image of the product.

I have 2 problems:
1. The only way I can seem to add an image is if it is already in an Office application i.e. Excel and I copy and paste it. Otherwise I have to go through the process of Inserting an Object, create from file, copy and paste into paint and then save. Any other way tries to add a link rather than embed.

2. All my images have been taken on my digital camera and are in JPEG format. It seems that 1MB is added to my database size every 4pictures or so.

I do not want to "link" the pictures as the idea is for the sales team to have a copy of the database and products on a memory stick, therefore keeping the references to the images will be tricky.

Does anyone know an easy way to get JPEG images embedded into an OLE object, with as little impact on filesize as possible. I only need previews of the products.

Thanks in advance.
 
you should link them.
you can keep the pics in a separate folder and move that folder with the db. actually, you could even keep the pics in the same folder as the db if you want and just move one folder. ideally, you'd want at least an app folder with two subdirs - db and images. then just move the app folder.

embedding = bloat.
 
Hi Wazz,

Thanks for the input. Yes I agree, so does the rest of the Internet population that embedding = bloating.

As different PC's/Laptops will see the USB as different drive letters I am looking for a way to use a relative reference i.e. ..\Pictures rather than H:\Pictures, any ideas?

I do not see why MS have not added further support for controlling images to stop the bloating.
 
Hi Wazz,

Thanks for the input. Yes I agree, so does the rest of the Internet population that embedding = bloating.

As different PC's/Laptops will see the USB as different drive letters I am looking for a way to use a relative reference i.e. ..\Pictures rather than H:\Pictures, any ideas?
Yes, you can. Using code you can use the

CurrentProject.Path

as a relative path. So if you had an images folder you could use
Code:
Dim strPath As String

strPath = CurrentProject.Path & "\images\" & Me!YourPicName
something like that.

I do not see why MS have not added further support for controlling images to stop the bloating.
They have in 2007.
 
Which version of Access are you using?

2007. No support for dragging and dropping jpegs, or copying and pasting unless from another Office App. Cannot find any options for compressing/reducing file size or quality of the images, only to leave them in their native format.
 
2007. No support for dragging and dropping jpegs, or copying and pasting unless from another Office App. Cannot find any options for compressing/reducing file size or quality of the images, only to leave them in their native format.

Yeah, dragging and dropping in Access is not really available for most things (if any). Also, it will store in the native format and resolution but in previous versions it converted to bmp at a high resolution. So it took more space. If you can lower the quality/resolution of the images, it will store them as is now.
 
Yeah, dragging and dropping in Access is not really available for most things (if any). Also, it will store in the native format and resolution but in previous versions it converted to bmp at a high resolution. So it took more space. If you can lower the quality/resolution of the images, it will store them as is now.

Hi Bob, How do you actually get the JPEG images into the OLE? If I right-click it in Form View and Insert Object, there is only an option to insert a bitmap. Then if I create a new file I get a version of MS Paint come up with a Paste From option whereby I can paste in my JPEG. A bit long winded a process to ask someone to do. If I insert from a file it recognises my JPEG as an HTML document :confused:
 
Hi Bob, How do you actually get the JPEG images into the OLE? If I right-click it in Form View and Insert Object, there is only an option to insert a bitmap. Then if I create a new file I get a version of MS Paint come up with a Paste From option whereby I can paste in my JPEG. A bit long winded a process to ask someone to do. If I insert from a file it recognises my JPEG as an HTML document :confused:

Can't answer you at the moment as I don't have 2007 at work. I would need to look at it to see as I don't remember off hand.
 
Here is a Link to a sample db that embeds images or different types using File to Blob and Blob to File.

This may help

David
 
Here is a Link to a sample db that embeds images or different types using File to Blob and Blob to File.

Hi David, Thanks for the input. I could not get that working properly, missing .OCX references etc. I notice it stores in Long Binary. Would storing the image in Long Binary format stop the bloating do you think?
 
If you go to tools and references and see what needs referencing and retry.

Have not done any tests for size differences

David
 
Hi All,

Thanks for the help. I am reviewing a program called DBPIX at the moment and it seems to do everything I need. It costs $99 however I think it may be worth the investment. Has anyone else had experience of this program?
 

Users who are viewing this thread

Back
Top Bottom