On Thu, 29 Apr 2021 16:49:06 +0000, Patrick Chevalley via lazarus
<lazarus@lists.lazarus-ide.org> wrote:

>
>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. 
>

Correct!
I could remove *all* the extra code I had added to create jpg, png and bmp
containers. Instead I could save directly from the MyCapture object, which has
built-in magic to save files correctly based on the commonly used extesnions in
the file name.

Problem solved, thanks!


-- 
Bo Berglund
Developer in Sweden

-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to