MrKim Well-Known Member Licensed User Longtime User Oct 19, 2018 #1 Well, I have got Camera2 more or less working the way I need it to, and saving as a bmp but I need to save the BMP as a compressed jpeg. After a lot of research there is a program called Camera that has a function PreviewImageToJpeg which seems like it would do what I need but I tried copying it to Camera2 but it uses 'parameters As Object' which appears to be set in CommitParameters which has a target of nativeCam which is set in Camera_Ready which has a target of cam. This is all well beyond my pay grade. I just want to save the image generated by Camera2 as a compressed jpeg, or convert the saved bmp file to compressed jpeg Any help is appreciated.
Well, I have got Camera2 more or less working the way I need it to, and saving as a bmp but I need to save the BMP as a compressed jpeg. After a lot of research there is a program called Camera that has a function PreviewImageToJpeg which seems like it would do what I need but I tried copying it to Camera2 but it uses 'parameters As Object' which appears to be set in CommitParameters which has a target of nativeCam which is set in Camera_Ready which has a target of cam. This is all well beyond my pay grade. I just want to save the image generated by Camera2 as a compressed jpeg, or convert the saved bmp file to compressed jpeg Any help is appreciated.
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2018 #3 PreviewImageToJpeg is not related. Code: Copy Dim bmp As Bitmap = cam.DataToBitmap(Data) Dim out As OutputStream = File.OpenOutput(...) bmp.WriteToStream(out, 100, "JPEG") out.Close Upvote 0
PreviewImageToJpeg is not related. Code: Copy Dim bmp As Bitmap = cam.DataToBitmap(Data) Dim out As OutputStream = File.OpenOutput(...) bmp.WriteToStream(out, 100, "JPEG") out.Close
MrKim Well-Known Member Licensed User Longtime User Oct 21, 2018 #4 Thanks Erel, works like a charm. Wish I could figure out how to research these things. I know one of the things that would really help me would be if the various string values for the different commands such as Outputstream could be part of the intellisense, of perhaps a link in the intellisense to the web page that contains the available options? Upvote 0
Thanks Erel, works like a charm. Wish I could figure out how to research these things. I know one of the things that would really help me would be if the various string values for the different commands such as Outputstream could be part of the intellisense, of perhaps a link in the intellisense to the web page that contains the available options?