您可以使用ZXing库中的此类
MultiFormatReader.
你必须在BitMap中获取Gallery图像并将其转换为:
Bitmap bMap = [...];
String contents = null;
int[] intArray = new int[bMap.getWidth()*bMap.getHeight()];
//copy pixel data from the Bitmap into the 'intArray' array
bMap.getPixels(intArray,bMap.getWidth(),bMap.getHeight());
LuminanceSource source = new RGBLuminanceSource(bMap.getWidth(),bMap.getHeight(),intArray);
BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
Reader reader = new MultiFormatReader();
Result result = reader.decode(bitmap);
contents = result.getText();
UPDATE1
要操纵大图像,请查看: