Board index » delphi » Stretch a BitMap larger than it is?

Stretch a BitMap larger than it is?

Hi,

I have D6 and Win9x & XP.

I read in a JPEG file which is 1024x768 and ASSIGN it to a BitMap.

How can I stretch this to a higher screen resolution - lets say 1280x960 ?

I cannot find the command like a normal image file eg 'image1.stretch :=
true'

Thx.

 

Re:Stretch a BitMap larger than it is?


i think you can use the method stretchdraw of the form.canvas

var
  rect:Trect;
begin
rect.left:=0;
rect.top:=0;
rect.right:=1280;
rect.bottom:=960;

myform.canvas.stretchdraw(rect,mybitmap);

Roberto

Quote
Fabian Walmsley <rwalms...@web.de> wrote in message 3d288e09_1@dnews...
> Hi,

> I have D6 and Win9x & XP.

> I read in a JPEG file which is 1024x768 and ASSIGN it to a BitMap.

> How can I stretch this to a higher screen resolution - lets say 1280x960 ?

> I cannot find the command like a normal image file eg 'image1.stretch :=
> true'

> Thx.

Re:Stretch a BitMap larger than it is?


Quote
"Fabian Walmsley" <rwalms...@web.de> wrote:
>Hi,

>I have D6 and Win9x & XP.

>I read in a JPEG file which is 1024x768 and ASSIGN it to a BitMap.

>How can I stretch this to a higher screen resolution - lets say 1280x960 ?

>I cannot find the command like a normal image file eg 'image1.stretch := true'

How are you using the image. If you are displaying it you are possibly using a TImage - in any case you can assign your JPEG to a TImage.Picture.Bitmap and then you have all your stretch properties. It depends on your utilisation.

Other Threads