Link to JPG without the file extension

  • Thread starter Thread starter ND
  • Start date Start date
N

ND

I need to find a way to link to a JPG file that dosnt have the .jpg
extension. We have a DB that handles the JPG using links to them but
renames them and removes the .jpg extension.

we want to use the images in another DB but when we try we get the error
that access dosnt support the format of the file

how do i tell access this is a jpg witout the.jpg extension?

thanks
 
Do you mean 'link' as-in 'OLE Linking' (ie using an OLE Object field),
or link by storing/generating the path and filename, and loading this file into an image control at runtime
?

Both methods are highly dependant on file extension associations, and I doubt that either could be made
to work for 'no' extension.

Stephen Lebans has posted on this subject several times, try searching google groups for something like
'stephen lebans jpg extension'

Ultimately you may need to use a component/library which correctly decodes images according to the file
contents, rather than simply by extension.
Stephen's site (www.lebans.com) has a solution based on the Intel jpeg library, or you could use a commercial
image component for Access such as our own.
 
A couple of options:
1) Simply create a temp copy of the image file at runtime that would
included the JPG extension.

2) Modify the LoadJpegGif solution on my site so that the extension is
not requried. It's probably only one or two lines of code.
http://www.lebans.com/loadjpeggif.htm
Developed to allow Access RunTime installations to display Jpeg files in
a standard Image Control. Provides functionality to load
JPG,GIF,BMP,EMF,WMF,CUR and ICO files on systems without the Office
Graphics Filters loaded.
Originally developed for Systems with Access Runtime only. Supports
transparency in Transparent Gifs. Allows you to resize Images on
Forms/Reports at runtime with no loss of Image quality.

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top