It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
                            
                        
                    
                
                                7年前关闭。
            
                    
ZXing库的Writer.encode()函数返回BitMatrix对象。如何将其转换为标准java Bitmap对象,以便可以将其用作Android中ImageView的源?

最佳答案

writeToFile(BitMatrix matrix, String format, File file)


此方法会将BitMatrix写入文件,现在您可以使用

BitmapFactory.decodeFile(newly created file name with path)


这将返回一个位图

有关更多详细信息,请参见this link

10-05 20:22
查看更多