Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Photo Quality in Access

Status
Not open for further replies.
May 27, 1999
9
IE
Is there any way to show some decent quality photos in an Access form without storing the actual images in Access itself?

I have some digital photos stored in one folder and I want to show them in an Access form but without storing them in the database because it would get so large

Some neat code in a previous post showed how this was possible by creating an image control on the form, deleting the image and substituting code which links the image control to the folder the photos are stored in. A text field on the form is used to enter the filename for each photo so by scrolling though the records the form loads and displays the relevant photo in the form each time.

Great, except that the quality of the photos as displayed in the Access form is very poor indeed.

Image quality is not a problem if I store the photo in the underlying table as an ole object but the database gets so large that way. These images are produced by Microsoft Photo Editor. If I link the file the photo comes through in jpeg format which seems to give a poor quality. There must be a way around this, anyone?





 
We have digital photos of homes rented by a property management company that we display on their forms. They're .jpg, sharp images, and range from 2k to 11k. We embed them. You can easily link to them instead, using the insert menu in form view. I see no difference in the quality between embedded and linked when I put the photos side by side in Access2000. I don't think it makes any difference whether they're embedded or linked...we store them twice, once in a picture subfolder in our database folder, and then in the db itself, when the user inserts them. If we have 200 photos and all were near the max size in our file, say 10k each we'd end up with 2mb devoted to storing pictures. We can live with that. As far as the quality goes, I'm really curious about why quality should diminish when the image is displayed in Access (we use Access2000). You can view some of the same images on the Realtor's web site: The index shows the thumbnails (about 2k) and you can then click to see the larger photos (about 10k, some a little larger).
I haven't answered your question...just rambling comment, I'm afraid. Good luck. :) Gus Brunston
An old PICKer
padregus@home.com
 
There is a product called, DBPix. This product allows you to store pictures in Access without the tremendous overhead.

Its easy to use, verstile, and pretty fast. How its done is by using the DBPix control on your Access form. Importing/exporting forms is all done through this control and can also be data-bound in an Access form. There is no degradation of quality either.

Gary
gwinn7
 
We use the Graphics-Wizard from (PowerUp-Section). This excellent software allows you to integrate all graphic files without bloating the MDB file.

Concerning the quality of the display, I share the opinion of my colleagues: there should not be any difference beetweeen embedded and linked files.
 
Thank you both for your responses, Gus and Gary

Yes it's true that there is no difference to picture quality whether the photo is linked or embedded as an ole object using the 'insert object' procedure. But you still have to go through the process of linking each photo individually each time you create a new record - or so it seems to me. I am hoping to avoid that.

I want each new record to be linked to a photo automatically. When the user sets up a new record and types the appopriate code/name in a specific text box, if there is a photo stored in the appropriate folder under that specific name then some visual basic code should pull in the photo automatically and display it on the form.

An ole object doesn't seem to accept some code which tells it that the photo is in a particular folder and to check the textbox on the form for the filename. This works for an image but the image unfortunately gives very poor picture quality, like a bad photocopy.

So maybe the question should be is there any way to give an ole object it's source using some (simple) visual basic code.

I thought it would be better to work it out within Access. So I am still messing with it. This is how you learn I suppose. Maybe there is something simple that I am doing wrong. All suggestions welcome from any bright sparks out there?



Martin




 
You do this simply using linking. There are two ways for it to link automatically, which may be a misnormer. One way is to maintain a link in the database and when the user selects the object the Picture property on the image control is updated to the path. Another way would be to have a naming convention which could be derived from the record information such as "15A-6-12-3 Fig 7-7.jpg" which would be a composite of the document number and figure number. Here is a little hard coded prototype I provided someone earlier.

Steve King


Private Sub cmdSwitchImage_Click()

If Me.Image0.Picture <> &quot;C:\My Documents\DmatsSendMsg.jpg&quot; Then
Me.Image0.Picture = &quot;C:\My Documents\DmatsSendMsg.jpg&quot;
Else
Me.Image0.Picture = &quot;C:\My Documents\15A-6-12-3 Fig 7-7 w Changes.jpg&quot;
End If

End Sub Growth follows a healthy professional curiosity
 
Hallo,

Just found your post as I had the same problem.
Fixed it by making the bitmaps all the same size (the same size as the image control.
I also use clip and linked settings.

-Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top