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
jconde2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brunoheCommented:
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.
0
LischkeCommented:
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
0
LischkeCommented:
Jconde2?

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

Ciao, Mike
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

jconde2Author Commented:
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
0
LischkeCommented:
Okay, I'm waiting for your expertise :-)

Ciao, Mike
0
jconde2Author Commented:
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.
0
LischkeCommented:
I'm pleased that your problem is solved now. Ask if you need more help...:-)

Ciao, Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bryan7Commented:
listenning
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Graphics Software

From novice to tech pro — start learning today.