H Herbert Souza Member Licensed User Longtime User Jun 30, 2015 #1 Help me. I have an application that takes a picture and upa for a url, to scan OCR, currently it takes the file from my internal directory, I need to make him take a picture of a file selection. how I do it? Line current code is: B4X: myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000) And I already have a button that opens a dialog to choose the file, I just need it to use the file you chose to select if my file "sample.gif" My dialogue box: B4X: Dim fd As FileDialog fd.FastScroll = True 'fd.ShowOnlyFolders = True fd.FilePath = File.DirRootExternal ' also sets ChosenName to an emtpy string 'fd.ShowOnlyFolders = True 'fd.FileFilter = ".txt" ' for example or ".jpg,.png" for multiple file types ret = fd.Show("B4A File Dialog", "Yes", "No", "Maybe", Bmp) ToastMessageShow(ret & " : Path : " & fd.FilePath & CRLF & "File : " & fd.ChosenName, False) Can someone give me a light? Sorry - me, I'm new in B4A.
Help me. I have an application that takes a picture and upa for a url, to scan OCR, currently it takes the file from my internal directory, I need to make him take a picture of a file selection. how I do it? Line current code is: B4X: myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000) And I already have a button that opens a dialog to choose the file, I just need it to use the file you chose to select if my file "sample.gif" My dialogue box: B4X: Dim fd As FileDialog fd.FastScroll = True 'fd.ShowOnlyFolders = True fd.FilePath = File.DirRootExternal ' also sets ChosenName to an emtpy string 'fd.ShowOnlyFolders = True 'fd.FileFilter = ".txt" ' for example or ".jpg,.png" for multiple file types ret = fd.Show("B4A File Dialog", "Yes", "No", "Maybe", Bmp) ToastMessageShow(ret & " : Path : " & fd.FilePath & CRLF & "File : " & fd.ChosenName, False) Can someone give me a light? Sorry - me, I'm new in B4A.
DonManfred Expert Licensed User Longtime User Jun 30, 2015 #2 try it like this... B4X: ret = fd.Show("B4A File Dialog", "Yes", "No", "Maybe", Bmp) ToastMessageShow(ret & " : Path : " & fd.FilePath & CRLF & "File : " & fd.ChosenName, False) myOCR.ExtractFromImage(File.Combine(fd.FilePath, fd.ChosenName), "", "scene", 20000) Upvote 0
try it like this... B4X: ret = fd.Show("B4A File Dialog", "Yes", "No", "Maybe", Bmp) ToastMessageShow(ret & " : Path : " & fd.FilePath & CRLF & "File : " & fd.ChosenName, False) myOCR.ExtractFromImage(File.Combine(fd.FilePath, fd.ChosenName), "", "scene", 20000)
H Herbert Souza Member Licensed User Longtime User Jun 30, 2015 #3 Thanks a lot, man, congratulations. Upvote 0