stretch a jpg

how do I stretch a jpg to low down the size ?
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.

Try this out for size ( or resizing) <G>

Procedure ScaleDownJPG(Fname:string;newheight,newWidth:integer) ;

var JPG1,JPG2:TJpegImage;
     With BMP do

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
for *file* sizes try this TJpegImage property:

CompressionQuality indicates the trade-off ratio between the image quality and the file size.

TJPEGQualityRange = 1..100;
property CompressionQuality: TJPEGQualityRange;

bryan7Author Commented:
I already use that property but I also want to reduce the size
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

bryan7Author Commented:
is it possible to resize directly the jpg without using a bitmap ?
I need to get screen captures to a jpeg to pass them to a memorystream to send over tcp/ip so I need some speed.. it would be faster if there was a way to resize the jpeg itself without passing through a bitmap before..
The problem is that the Jpeg doesn't have a Canvas property, so you can't StretchDraw to it. To accomplish what you are looking for , you are going to have to use some sort of intermediate device context.... a bitmap, TCanvas, etc.

Good luck!!
bryan7Author Commented:
sorry for the delay..

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.