[Kde-pim] Review Request: Don't always recompress contact photos when saving

Sebastian asamk at gmx.de
Tue Oct 23 23:14:45 BST 2012


Great, thanks!
just one thing, you didn't commit the testroundtrip changes.
(testroundtrip.qrc and tests/vcard5.vcf.ref), on purpose or did you miss
them?

Cheers,
Sebastian

Am 23.10.2012 23:41, schrieb Commit Hook:
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106745/
>
>
> This review has been submitted with commit c0a50e2b6e7a8513d0a768afb35bc7aa3d1748f1 by Allen Winter to branch master.
>
> - Commit
>
>
> On October 21st, 2012, 11:45 p.m., Sebastian Scheibner wrote:
>
> Review request for KDEPIM-Libraries.
> By Sebastian Scheibner.
>
> /Updated Oct. 21, 2012, 11:45 p.m./
>
>
>   Description
>
> When changing a contact with a photo, the photo is recompressed when saving (even though the photo wasn't changed). That's because the photo is loaded into a QImage and when the contact is saved, the QImage is compressed as JPEG again (or PNG if it contains an alpha-channel, which most don't).
>
> This patch stores the raw base64 photo data from the vcard as a QByteArray in KABC::Picture. If the photo is not changed, this QByteArray is simply used when saving the contact, so there's no recompression and quality loss. If the photo was changed it gets compressed as JPEG as before.
>
> fixes this bug: https://bugs.kde.org/show_bug.cgi?id=307570
>
>
>   Testing
>
> compiled kdepimlibs/kabc with kde 4.9.2
>
> - created a new contact in kaddressbook and added a photo. exported the contact.
> - changed the photo and exported the contact again
> - the image data in the exported file didn't change
>
> *Bugs: * 307570 <http://bugs.kde.org/show_bug.cgi?id=307570>
>
>
>   Diffs
>
>   * akonadi/contact/editor/imagewidget.h (92df283)
>   * akonadi/contact/editor/imagewidget.cpp (e1a0527)
>   * kabc/picture.h (bf9745c)
>   * kabc/picture.cpp (0a51c8b)
>   * kabc/tests/picturetest.h (2b33e18)
>   * kabc/tests/picturetest.cpp (b599b48)
>   * kabc/vcardparser/testroundtrip.qrc (a858dc2)
>   * kabc/vcardparser/tests/vcard5.vcf.ref (712b494)
>   * kabc/vcardtool.cpp (e876e81)
>
> View Diff <http://git.reviewboard.kde.org/r/106745/diff/>
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list