I am getting Barcode
(com.google.android.gms.vision.barcode) object from a physical sales card via camera. Is there a way to convert it back to a image using gms:play-services-vision
library?
Asked
Active
Viewed 100 times
0

Cœur
- 37,241
- 25
- 195
- 267

Vasile Doe
- 1,674
- 1
- 24
- 40
2 Answers
0
I think you will get barcode value in a string. you may try to below code
TextView tv = (TextView)findViewById(R.id.textview);
tv.setText(bitmapstring);
tv.buildDrawingCache();
ImageView img = (ImageView)findViewById(R.id.imageview);
img.setImageBitmap(tv.getDrawingCache());

ketan muttha
- 296
- 2
- 7
0
Seems like there's no way of doing that by using the play-services-vision
library. My first thought would be to take a screen capture of the preview of the camera before actually reading the barcode, but let's suppose you cannot do that.
If you have the actual data and the format of the barcode you can use ZXing to generate back the barcode image.
Here's an example of how to do it: Generate barcode image in Android application

mikehc
- 999
- 8
- 22