텍스트 :자 마린 안드로이드 - 이미지는이 코드를 발견
// provide read access to the file
FileStream fs = new FileStream(media.Path, FileMode.Open,FileAccess.Read);
// Create a byte array of file stream length
byte[] ImageData = new byte[fs.Length];
//Read block of bytes from stream into the byte array
fs.Read(ImageData,0,System.Convert.ToInt32(fs.Length));
//Close the File Stream
fs.Close();
string _base64String = Convert.ToBase64String (ImageData);
나는 이미지를 전달하고있는 수입이 작업을 진행하게 사용하는 방법을 모르겠어요. 기본적으로 이미지를 가져 와서 텍스트로 변환하려고합니다.
감사
으로
"이미지를 가져 와서 텍스트로 변환 하시겠습니까?" 이미지의 텍스트를 읽는 것을 의미합니까? 그렇게하는 것은 여기있는 것보다 훨씬 더 복잡합니다. – EJoshuaS
아니요, 이미지를 텍스트로 변환해야 데이터베이스에 저장할 수 있습니다. –
첫 번째 인수 인 media.Path는 이미지에 대한 파일 경로입니다. – Jason