Display JPG File in Form or Report

G

Gordon Padwick

I'm trying to create an Access application for my personal use that will
index the photographs I take with my Canon Digital Rebel XT camera. I
usually take photographs using the camera's maximum resolution, resulting in
large JPG files (3 - 6 MB)

I've created a database that displays a small version of each photograph,
together with information about each photograph.

My problem is that the database runs very slowly, taking several seconds to
access each large JPG file.

The solution to this problem seems to be to create and store a
low-resolution version of each original JPG file that the Access database
can use. I've found that I can use PhotoShop or other graphics applications
to open each original JPG file and save a low-resolution version of it that
my Access database can open quickly. What I'm looking for, though, is a way
to automate the procedure of converting a batch of high-resolution JPG files
into small, low-resolution files so that I don't have to deal with each
original file individually.

Can anyone suggest a method I can use to quickly convert a batch of
high-resolution (large) JPG files to low-resolution (small) JPG files that
Access can open quickly? Perhaps there's a programming technique, or perhaps
there's an application I can download or purchase.

Gordon
 
D

Dirk Goldgar

Gordon Padwick said:
I'm trying to create an Access application for my personal use that
will index the photographs I take with my Canon Digital Rebel XT
camera. I usually take photographs using the camera's maximum
resolution, resulting in large JPG files (3 - 6 MB)

I've created a database that displays a small version of each
photograph, together with information about each photograph.

My problem is that the database runs very slowly, taking several
seconds to access each large JPG file.

The solution to this problem seems to be to create and store a
low-resolution version of each original JPG file that the Access
database can use. I've found that I can use PhotoShop or other
graphics applications to open each original JPG file and save a
low-resolution version of it that my Access database can open
quickly. What I'm looking for, though, is a way to automate the
procedure of converting a batch of high-resolution JPG files into
small, low-resolution files so that I don't have to deal with each
original file individually.

Can anyone suggest a method I can use to quickly convert a batch of
high-resolution (large) JPG files to low-resolution (small) JPG files
that Access can open quickly? Perhaps there's a programming
technique, or perhaps there's an application I can download or
purchase.

You might be able to use IrfanView to do your conversions ion batch
mode. See

http://www.irfanview.com
 
G

Gordon Padwick

Thanks, Dirk.

I've downloaded IrfanView and taken an initial look at it. Quite an
impressive work. Looks like it will do what I need. I suggest other people
who work with graphics take a look at IrfanView.

Gordon
 
G

Gordon Padwick

Thanks, Dirk, for suggesting IrfanView.

I've downloaded it and have found that it does the batch process I was
looking for. I haven't yet explored all the application's capabilities, but
from what I've seen so far, I'm very impressed. I recommend that anyone
interested in processing photograph files take a look at IrfanView.

I found that IrfanView could, indeed, create low-resolution JPG files. But
that did'nt solve my problem of displaying JPG files in an Access database.
Access seems to take a long time to open JPG files of any size. What I did
find, though, was that I could use IrfanView to create small BMP files from
my original large JPG files, and that Access displayed those BMP files very
quickly. So, my problem is partly solved in a way I didn't quite expect.

IrfanView comes witrh quite comprehensive Help files, including help about
Batch Conversion. The Help on that subject refers to using Batch Conversion
" from outside IrfanView using a command line option." That gave me the hope
that I could call up IrfanView from within my Access application. I've not
had much luck trying to run IrfanView from command line options.

I have to explore this matter some more, but would appreciate any
suggestions.

Gordon
 
R

Richard W. \(Rich\) McCabe

Gordon, I fought the image problem with a database I wrote to manage digital
images of wildflowers also taken with a Digital Rebel. When I got to about
175 species fo flowers, the database was approaching 2 gigabites and quit
working. Turns out there is a 2 gig maximum ize. I decided to store the
path to each image in the database and open the images as I needed to veiw
each one. I have seven variables, general directory, flower directory and
ImgName1, through ImgName4. I open individual images with command buttons
using the following commands:

Me.Image1 = ""
Me.lstTest = ""
Me!lstTest = Me!GenDirectory & Me!FlwDirectory & Me!ImgName1
If InStr(Me.lstTest, "JPG") = 0 Then
MsgBox "There is no data for Picture #1."
Else
Image1.OLETypeAllowed = acOEmbedded
Image1.SourceDoc = Me.lstTest
Image1.Action = acOLECreateLink
Image1.SizeMode = acOLESizeStretch
End If
End Sub
Several comments:
the Me.Image1 is an unbound 0bject frame on the form and Me.lstTest in an
unbound text box on the form.
ince I may open the pictures in random order, the first two statements set
both the object frame and unbound text box to null before opening the next
image.
Rich (e-mail address removed)
 
D

Dirk Goldgar

Gordon Padwick said:
IrfanView comes witrh quite comprehensive Help files, including help
about Batch Conversion. The Help on that subject refers to using
Batch Conversion " from outside IrfanView using a command line
option." That gave me the hope that I could call up IrfanView from
within my Access application. I've not had much luck trying to run
IrfanView from command line options.

I have to explore this matter some more, but would appreciate any
suggestions.

Presumably they're talking about executing IrfanView and passing it
command-line options to control its behavior. I haven't had occasion to
read the IV help file about those options; presumably you can do that.

You may be unsure how to invoke IrfanView from Access. You can do that
with the Shell function. You'd pass the function the complete
command-line (including the command-line options), as a string, just as
you would have typed it in a Command window. You'll find information on
the Shell function in the Access help files, though you'll probably have
to search from the VB Editor to get to that section.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top