VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345[6]78910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 11:39:13 03/25/02 Mon
Author: Marko
Subject: Smaller image - Bigger File size!!!!

Hi all.

I'm trying to resize an image and save it to a .jgp file.
To accomplish that I'm using a TResizeTransform and a TJpegGraphic, then saving to a TFileStream. The original image is a 640x480 jpeg, 41KB file from a digital cam.

The resulting file has 170KB!!!

Please send me the correct algoritm if you see something wrong.

Thanks.

P.S.: This is the code I'm using.
// transform to resize

Transform.Interpolated := True;
Transform.Filter := ifMitchell;
Transform.OverrideDestFormat := True;
Transform.DestFormat := ifTrueColor;

Transform.Width := 400;
Transform.Height := 300;

Transform.ApplyOnDest(ImageScrollBox.Graphic, ImageScrollBoxGuardar.Graphic);

// save to jpeg

Jpeg := TJpegGraphic.Create;
Jpeg.Assign(ImageScrollBoxGuardar.Graphic);
JPeg.XDotsPerInch := 72;
Jpeg.SaveQuality := 85;
Jpeg.SaveProgressive := false;
Jpeg.OptimizedHuffmanCodes := true;
Jpeg.SaveToStream(archivo);
Archivo.Free;
Jpeg.Free;

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.