lmdbxx
lmdbxx copied to clipboard
How can I save '0' ?
Hi, When I try to save orgin image data using lmdb++, I find that I cannot save images containing piexls with gray-level zero. As I have to transform the image data into a string first, the string usually 'breaks' whenever there exits zero pixels. How can I solve this problem ? Thanks very much!
@SuperWu090
Have you tried to serializer the image struct to a string but prepad it with a character say a '#' every time; then upon deserialization from the string back to your struct, remove the first character (the '#' you pre-padded your data with). This will insure that your string is never empty.
There should be another parameter size_t dataLength in the put method.