-
делаю скриншот при ошибке и мылю себе. Размер около 2 метров, не подскажете как меньше сделать? //--------------------------------- procedure ScreenShot(Bild: TBitMap); var c: TCanvas; r: TRect; begin c := TCanvas.Create; c.Handle := GetWindowDC(GetDesktopWindow); try r := Rect(0, 0, Screen.Width, Screen.Height); Bild.Width := Screen.Width; Bild.Height := Screen.Height; Bild.Canvas.CopyRect(r, c, r); finally ReleaseDC(0, c.Handle); c.Free; end; end; //--------------------------------- begin try imageP:=tImage.Create(nil); ScreenShot(ImageP.Picture.BitMap);
-
преобразовать в другой формат, например в Jpeg
-
The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. Windows stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.
BOOL StretchBlt(
HDC hdcDest, // handle of destination device context int nXOriginDest, // x-coordinate of upper-left corner of dest. rect. int nYOriginDest, // y-coordinate of upper-left corner of dest. rect. int nWidthDest, // width of destination rectangle int nHeightDest, // height of destination rectangle HDC hdcSrc, // handle of source device context int nXOriginSrc, // x-coordinate of upper-left corner of source rectangle int nYOriginSrc, // y-coordinate of upper-left corner of source rectangle int nWidthSrc, // width of source rectangle int nHeightSrc, // height of source rectangle DWORD dwRop // raster operation code );
-
> Игорь Шевченко © (25.04.08 10:45) [1]
+1
-
Ega23 © (25.04.08 10:51) [2]
Лупу не забудь приложить :)
|