diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-03-20 12:57:20 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2013-03-25 20:57:37 (GMT) |
commit | 9bceeec1a24bb3b7c579e432f1a0f1d4d9caf721 (patch) | |
tree | f65bb1839b40118680f7145fc46756f4d7c3c27f /utils.py | |
parent | 07f557ded08cc24dafd15bd596355308206a2680 (diff) |
Don't save preview encoded - SL #4470
We don't need save the preview in the metadata encoded,
doing it makes more difficult the interoperability with other
activities using it, and takes more space in the disk.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -8,12 +8,19 @@ from time import strftime import constants -def getStringFromPixbuf(pixbuf): + +def getStringEncodedFromPixbuf(pixbuf): data = [""] pixbuf.save_to_callback(_saveDataToBufferCb, "png", {}, data) return base64.b64encode(str(data[0])) +def getStringFromPixbuf(pixbuf): + data = [""] + pixbuf.save_to_callback(_saveDataToBufferCb, "png", {}, data) + return str(data[0]) + + def _saveDataToBufferCb(buf, data): data[0] += buf return True |