Duplicate of #163, already fixed. Fix will be included in next release.
Photos degrade under certain conditions...
-
I have seen bug reports on here already about this, but I can add more detail here. Every time a contact is ‘imported’ into Android the quality degrades. So if you set a nice picture for someone on your CardDAV server, when you sync to Android it degrades. Then you change the contact’s number on your Android device. When you sync again the vCard will go in its entirety (including degraded picture) back to your CardDAV server.
Now you change the contact again on another sync’d client.
The Android device syncs again, degrades the photo further. Repeat process until pictures are barely visible.
Looking in: https://github.com/rfc2822/davdroid/blob/master/src/at/bitfire/davdroid/resource/Contact.java
at Line 388:
// PHOTO
if (photo != null)
vcard.addPhoto(new Photo(photo, ImageType.JPEG));It seems at this point DAVDroid is saying take the photo byte stream and make it into a JPEG (hence further compressing it). I do not know how to access the ezvcard source to verify this …
If this turns out to be a problem with the Android Contact Provider then I think a bug should be submitted to AOSP… but seems unlikely as the Google sync adapters would have the same problem.
-
It seems at this point DAVDroid is saying take the photo byte stream and make it into a JPEG (hence further compressing it). I do not know how to access the ezvcard source to verify this …
I don’t think ezvcard messes around with image formats. It just uses the data as a binary blob, see here: https://code.google.com/p/ez-vcard/source/browse/#svn%2Ftrunk%2Fsrc%2Fmain%2Fjava%2Fezvcard%2Fproperty
Photo extends ImageProperty extends BinaryPropertyAnd please follow up in #296.
-
FYI…
https://jira.cyanogenmod.org/browse/CYAN-5780?jql=project %3D CYAN AND text ~ "contact degrade"
If no-one picks it up, I will try the fix myself and see if it works. If it does I’ll then do a pull-request to CM. Thanks for your reply.