Hi, I am using this project as the basis for a server application.
I tested the application and it works very well but it is a desktop application.
and I don't know how I can do this in b4j server.
and tried to do this without success:
the image is uploaded to the directory
I would appreciate any help or examples that can be provided.
Tesseract-clipboard: OCR images stored in clipboard
Hi, I made a tesseract-ocr ui frontend, which will convert images stored in the clipboard into texts. Different from https://www.b4x.com/android/forum/threads/screen-ocr-in-5-minutes-and-50-lines.90655/, my version is very simple. It utilizes the system's screencapture shortcut to store images...
www.b4x.com
I tested the application and it works very well but it is a desktop application.
and I don't know how I can do this in b4j server.
In desktop app:
Dim out As OutputStream
out=File.OpenOutput(File.Combine(File.DirApp,"tesseract-ocr"),"image.png",False)
ImageView1.GetImage.WriteToStream(out)
out.Close
and tried to do this without success:
bj4[server]:
Dim out As OutputStream
out=File.OpenOutput(File.Combine(File.DirApp,"tesseract-ocr"),"image.png",False)
Dim nombreArchivoTemporal As String = Main.NombreArchivo
Dim imageData() As Byte = File.ReadBytes(File.DirApp & "/up", nombreArchivoTemporal)
Dim lengnt As String = nombreArchivoTemporal.Length
out=File.OpenOutput(File.Combine(File.DirApp,"tesseract-ocr"),"image.png",False)
out.WriteBytes(imageData, 0, lengnt)
out.Close
the image is uploaded to the directory
and the name of the image I save here when uploading the imageFile.DirApp & "/up"
Dim nombreArchivoTemporal As String = Main.NombreArchivo
I would appreciate any help or examples that can be provided.