Re: [Lazarus] How to save screenshot to jpg and png format files

2021-04-29 Thread Patrick Chevalley via lazarus
Hi, Replace : MyCapture.Bitmap.SaveToFile(ChangeFileExt(ParamStr(0), '.jpg')); by : MyCapture.SaveToFile(ChangeFileExt(ParamStr(0), '.jpg')); This work because Bgrabitmap set automatically the image writer based on the extension. Patrick 29 avril 2021 17:49 "Bo Berglund via lazarus" a écri

Re: [Lazarus] How to save screenshot to jpg and png format files

2021-04-29 Thread R.Smith via lazarus
On 2021/04/29 17:49, Bo Berglund via lazarus wrote: I have an application which can capture a regon of the desktop into an image. It uses TBgraBitmap since it has a method for grabbing data from the screen. So I can assign this to the clipboard and also save to a file: var MyCapture : TBgraB

[Lazarus] How to save screenshot to jpg and png format files

2021-04-29 Thread Bo Berglund via lazarus
I have an application which can capture a regon of the desktop into an image. It uses TBgraBitmap since it has a method for grabbing data from the screen. So I can assign this to the clipboard and also save to a file: var MyCapture : TBgraBitmap; Clip: TRect; ... begin ... Clip := Bound