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 := Bounds(Self.Left, Self.Top, Self.Width, Self.Height); MyCapture := TBgraBitmap.Create(); MyCapture.TakeScreenShot(Clip); Clipboard.Assign(MyCapture.Bitmap); MyCapture.Bitmap.SaveToFile(ChangeFileExt(ParamStr(0), '.jpg')); MyCapture.Free; ... end; 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? -- Bo Berglund Developer in Sweden -- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus