blind-coder/rcmcarddav — pull request #15 by skrat (2013-11-21 00:16:48+00:00)
Title: cropping contact photo on output

Certain clients (e.g. iOS Contacts app) use X-ABCROP-RECTANGLE in PHOTO to specify how the image data should be cropped on output. This hook adjusts display contact photo to be output with respect to X-ABCROP-RECTANGLE if present. This makes much nicer UX if you use your phone to set contact picture.

There is dubious part on line 538. This happens when the mail view request a contact picture using email address, this way a search is performed and currently I don't see a way to get `vCard` out of it to be passed to the hook.