how to get image from lmdb by python?

and what is the data type of that result, does that data type match the function open('xx.jpg').read()

my purpose is to read image from lmdb and then match my code (that code is written for data type of open('xx.jpg').read() ),so I want to get the same data type from lmdb if I can