[Lazarus] How to save screenshot to jpg and png format files
bo.berglund at gmail.com
Thu Apr 29 17:49:43 CEST 2021
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:
MyCapture : TBgraBitmap;
Clip := Bounds(Self.Left, Self.Top, Self.Width, Self.Height);
MyCapture := TBgraBitmap.Create();
But the SaveToFile results in a file that is NOT a jpeg file at all...
How could I save it to a specific (known) format, like jpg or png?
Developer in Sweden
More information about the lazarus