Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I save '0' ? #14

Open
SuperWu090 opened this issue May 28, 2016 · 2 comments
Open

How can I save '0' ? #14

SuperWu090 opened this issue May 28, 2016 · 2 comments

Comments

@SuperWu090
Copy link

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!

@ghost
Copy link

ghost commented Sep 8, 2016

@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.

@rgex
Copy link

rgex commented Sep 1, 2017

There should be another parameter size_t dataLength in the put method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants