gsm Posted June 6, 2013 Share Posted June 6, 2013 (edited) sorry PNG to text decode possible? 6.php Edited June 6, 2013 by gsm Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 6, 2013 Share Posted June 6, 2013 Yes, you would need get an external OCR (Optical Character Recognition) component and call that from within PHP. I don't believe there is any OCR readers built to be run just within PHP. Quote Link to comment Share on other sites More sharing options...
gsm Posted June 8, 2013 Author Share Posted June 8, 2013 Yes, you would need get an external OCR (Optical Character Recognition) component and call that from within PHP. I don't believe there is any OCR readers built to be run just within PHP. what about this code? private string ConvertImage(Bitmap sBit) { MemoryStream imageStream = new MemoryStream(); //sBit.Save(imageStream, ImageFormat.Jpeg); sBit.Save(imageStream, System.Drawing.Imaging.ImageFormat.Png); return Convert.ToBase64String(imageStream.ToArray()); } private void button1_Click(object sender, EventArgs e) { Bitmap sBit = new Bitmap(@"C:\abc.png"); string imageString = ConvertImage(sBit); // StreamWriter sw = new StreamWriter(@"C:\waleedelkot.text", false); StreamWriter sw = new StreamWriter(@"C:\wal.doc", false); sw.Write(imageString); sw.Close(); MessageBox.Show("success"); } Quote Link to comment Share on other sites More sharing options...
boompa Posted June 8, 2013 Share Posted June 8, 2013 That's not PHP code, it's C# code. And it converts an image to a base-64 representation. If that's all you want then you can use base64_encode; check out this comment on that page. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.