Lebans LoadJpeg Create huge emf files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the loadjpegGif function by Steven Lebans to convert jpeg images
into emf format so they can be displayed correctly using the access runtime.
The problem i'm having is when the dimensions of a jpeg are large, the
resulting emf file is anywhere from 5mb-11mb in size, even though the
physicall size of the jpeg is only 183k. If the jpeg dimensions are
reduced then the resulting emf is created much smaller, like 486k.

I want to be able to do two things.
1. shrink the existing very large emf images to an acceptable size. As I
have a large number of images doing this programatically is the only option.
2. Make sure that new images are not created so big. As I can't rely on the
end user to resize their jpegs properly I would like to resize the jpeg on
the fly by perhaps creating a copy, resizing it an then converting to emf
format.

Thanks in advance.
 
I'm no expert (others may have better suggestions) but this has worked for
me in the past and allowed me to use a multitude of image formats.

*************
Dim strPath As StringstrPath = "C:\Images\" &
Me.txtFileNameMe.imgControlName.Picture = strPath Where txtFileName is the
name of the text box containing the filename and imgControlName is the name
of the image control. Furthermore, to be able to display jpg and other
formats of images you must use an Image and not a bound or unbound
frame.**********************

Basically, I created a field that contained the name of the image to be
displayed (assuming they are all in a common dir). Otherwise the field
would have to contain the specific location and file name for it to work.
Note:the file name must include the extension

I hope this help,

CARDA
 
VB/VBA code to resize Images is readily available if you are familiar
with developing around the GDI API's. It is a steep learning curve to
begin with and I would not reccommend it unless you really enjoy this
type of development.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Visual Basic Programmer's Guide to the Win32 API by Appleman
Hardcore Visual Basic - MCKinney (Available free online)

Any VB graphics book by Rod Stephens

For API in general the standard is "Programming Windows" by Charles
Petzold. It is written for C developers but is still a must read for any
developer starting out with API.

Finally, the best source, is well, the source. VIsit the MSDN site here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/win
gdistart_9ezp.asp


--

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