 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bogdan £. Guest
|
Posted: Mon Sep 27, 2004 11:07 am Post subject: How change size JPEG image ? |
|
|
Hi,
how can I change size JPEG image and save to a new file ?
Bogdan.
|
|
| Back to top |
|
 |
Heinrich Wolf Guest
|
Posted: Mon Sep 27, 2004 2:54 pm Post subject: Re: How change size JPEG image ? |
|
|
Hi,
take this example of shrinking to half size.
var JpegImage : tJpegImage;
Bitmap : tBitmap;
begin
if OpenPictureDialog.execute then
begin
JpegImage := tJpegImage.Create;
Bitmap := tBitmap.Create;
JpegImage.LoadFromFile(OpenPictureDialog.FileName);
Bitmap.Height := JpegImage.Height div 2;
Bitmap.Width := JpegImage.Width div 2;
Bitmap.Canvas.StretchDraw(
Rect(0, 0, Bitmap.Width, Bitmap.Height), JpegImage);
JpegImage.Assign(Bitmap);
JpegImage.SaveToFile(OpenPictureDialog.FileName);
JpegImage.Free;
Bitmap.Free;
end;
end;
Regards from
Heiner
|
|
| Back to top |
|
 |
Rene Tschaggelar Guest
|
Posted: Mon Sep 27, 2004 3:34 pm Post subject: Re: How change size JPEG image ? |
|
|
Bogdan #. wrote:
| Quote: | Hi,
how can I change size JPEG image and save to a new file ?
|
I have a page about thumbnails which should give you an idea.
Rene
--
Ing.Buro R.Tschaggelar http://www.ibrtses.com
Your newsgroups @ http://www.talkto.net
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|