Link to home
Start Free TrialLog in
Avatar of jconde2
jconde2

asked on

Resize GIF & JPG and save to a file.

Hi, I am developing a CGI that needs to resize a GIF or JPG image to a specified width and height.

Could someone tell me of any component that does this which is freeware and source included please?

thx,

jorge
Avatar of brunohe
brunohe

There's a nice lib with many features, called Envision Image Library.

ftp://ftp.cdrom.com/pub/delphi_www/ftp/d30share/enlib102.zip

I think you'll find what you need.
Hi Jconde2,

you can download my GraphicEx unit (www.lischke-online.de or www.DelphiPages.com) which can resample any TBitmap to any size with various filters (either to optimize speed or quality).

In opposition to the Envision library my stuff is free and comes with source (and works excellent).

To scale say a JPEG you need to do:

- create a TJPEGImage
- load your image
- create a normal TBitmap
- call TBitmap.Assign(YourJPEG)
- resample the bitmap
- call YourJPEG.Assign(TheBitmap)
- save the JPEG to file

Ciao, Mike
Jconde2?

If you need source code how to call the Stretch(...) procedures then tell me...

Ciao, Mike
Avatar of jconde2

ASKER

Hi brunohe , Mike

brunohe, I have already seen that library, but the thing is it isn't freeware :( .... I saw one that's just what I need called ImagN from pegasus software, but again it is not freeware and the source code isn't included!!!

Mike, let me check your unit up and Ill get back to you ok?

thanx!!!

jorge
Okay, I'm waiting for your expertise :-)

Ciao, Mike
Avatar of jconde2

ASKER

Hi Mike,

even though I didn't fully use your unit (because of some specific features I needed that drove me to write my own) your code really helped me!

Thank you very much,

Jorge

P.S.  answer this Q plz.
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
listenning