B4A Question camex save picture problem - Brian Dean (first post)    Sep 22, 2022   (1 reaction) File.DirInternal is (and always has been) storage that is private to the app, inaccessible to the User and to other apps (unless on a "rooted" device).
You need to use one of the options listed here to save the data somewhere else. B4A Question How to save Preview picture in CamEx - Gary Milne    Mar 11, 2015 I think this is probably easy but I cannot find an example.
In the CameraEx class there is a function called PreviewImageToJpeg(data() as byte, quality as Int) as Byte()
The first parameter (data as byte array) refers to the camera preview image formatted in YUV.
My code would be something like:
B4A Question CamEX Save Resolution - Erel (first post)    Feb 28, 2017   (1 reaction) 'save the selected size:
File.WriteMap(File.DirInternal, "size.txt", CreateMap("width": size.Width, "height": size.Height)
'load it when you want to set the picture size:
If File.Exists(File.DirInternal, "size.txt") THen
Dim m As Map = File.ReadMap(File.DirInternal, "size.txt")
CamEx.SetPictureSi B4A Question Saving An Image With CamEx2 - Erel (first post)    Dec 02, 2018   (2 reactions) No need to post the class code.
Wait For(cam.FocusAndTakePicture(MyTaskIndex)) Complete (Data() As Byte)
File.WriteBytes(Dir, FileName, Data) B4A Question Crop and save image - ykucuk (first post)    Aug 04, 2022   (1 reaction) i found a solution. Let me know id there is better solution
Dim faceLoc As JavaObject=face.RunMethod("getPosition",Null)
Dim jpeg() As Byte = camEx.PreviewImageToJpeg(data, 100)
Dim bmp As Bitmap
Dim ins As InputStream
ins.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
bmp.Initialize2(ins)
ins.C B4A Question CAMEX2 - DonManfred (first post)    Feb 02, 2019   (1 reaction) no. you get the bytes of the picture taken. You can do with it what you want. Save it on the device if you want/need to.
Search the forum on how to save bytes to a file. B4A Question [SOLVED]How to save image using CameraEx - Zvi    Nov 27, 2018   (1 reaction) I used the CameraEx example and it works perfectly, except that it doesn't save the image to my phone (Redmi Note4).
The relevant sub in the example is given as:
Sub Camera1_PictureTaken (Data() As Byte)
Dim filename As String = "1.jpg"
Dim dir As String = File.DirInternal
camEx.SavePict B4A Question CamEx2 - continuously take photos while saving battery - Erel (first post)    Feb 13, 2024 5 minutes is an interval too short for StartServiceAt.
You will need to have a foreground service that starts an activity every 5 minutes. Then open the camera, take a picture, close the camera and close the activity. B4A Question CameraEx: it saves picture rotated 90o CCW - achtrade    May 09, 2017 in the preview the image is ok but when it saved it's rotated 90o CCW. How to fix it ? thanks. Private Sub InitializeCamera camEx.Initialize(Panel1, frontCamera, Me, "Camera1") frontCamera = camEx.Front End Sub Sub Camera1_Ready (Success As Boolean) Dim lSizes() As CameraSize Di B4A Question Camex preview to image file ? - Devv (first post)    Apr 09, 2015 thanks for fast replay bro
i tried the code in the link you provided but the result was some difference between the preview and the saved file . + i couldn't control when to save the image cuz
camera1_Preview(Data() As Byte) is always running and i couldn't even stop it .
any other methods ? Page: 1   2   3   4   5   6   7   Powered by ColBERT |