PDA

Click to See Complete Forum and Search --> : How to compress JPG-files (KBytes) in VB?


Franky
Feb 20th, 2002, 12:38 AM
Hi everybody,

I would like to know that anybody got a idea how to solve this problem:

I wrote a program in which the user can upload his pictures and collect them in a Sub-Dir on their harddisc. The problem is that i have to the KBytes of the pictures.

Example:
A user upload a pic with a size of 120 KByte, i want that a modul (with parameters that i can set) compress this picture to 30 KByte.

Any modules around, any ideas for it?
I don't want to use external programs .... The solution have to be included in my program.

Thanks in advance for your replys
Franky
Bangkok

Si_the_geek
Feb 20th, 2002, 04:08 AM
Go to intel's web site and find something called "Intel Jpeg Library", it lets you save Jpeg's with an optional "quality" parameter - the lower the quality the lower the file size.

Unfortunately you'll have to save a picture several times at various "quality" settings to get it to a certain file size, as each picture compresses differently.