Skip to main content

This product use super-modern browser feature for accessing the user’s webcam (if any) to directly save a new portrait photo inside Plone personal preferences.

How it works

Just add the product to your buildout and activate the collective.takeaportrait add-on.

After that you will probably see a new button inside your “Personal Information” labeled “Take a photo”. If you don’t see any new button your browser will probably not support Media Capture API.

alternate text alternate text alternate text

When pressing the button the browser will ask you the permission to access the Webcam and you must accept to continue. The security request format is vendor specific.

When confirmed you will see the new portrait overlay, where the webcam is activated and the output stream is directly on your browser.

alternate text

You have two possible actions: close the window or take a photo. In the latter case a delay counter will be displayed on the left (you can raise or lower the delay using the range control, from 0 to 10 seconds).

alternate text

Note: only the image part inside the highlight yellow section (the viewfinder) will be used as a new portrait. You can move the viewfinder by drag and drop with the mouse (not working on mobile right now).

After every shot taken, you can look at a preview of the image, and repeat the operation until you get a nice portrait.

alternate text

Finally, you can save the new portrait in the user’s preferences. The image in the form will be immediately updated from the server.

alternate text

Face detection

The product contains a face detection support, that can automatically center the viewfinder on any recognized face.

Default implementation rely onto the OpenCV, Computer Vision Library (that must be installed on your Python env) and must be explicitly activated:

[instance]
...
zcml=
    ...
    collective.takeaportrait.opencv

If you manually move the viewfinder, the auto-center feature based on face detection will be stopped.

Plone integration

As customizing the user preference form is something I don’t like very much, this product is adding new features only using pure JavaScript.

Tested on Plone 4.3.

Browsers support

The user’s browser must support HTML Media Capture API so only recent and cool browser can be used:

  • Firefox: tested with Firefox 25

  • Chrome: tested with Chrome 30 (a little slow, but works)

  • Opera: tested with Opera Next, version 18

  • Safari: no support (c’mon Apple…)

  • Internet Explorer: support is expected for Internet Explorer 31 [1]

To know if your browser is supported, see the Can I Use Web site.

Mobile

  • Safari on iOS: no support

  • Android Browser (Android 4.2.2): no support

  • Chrome on Android: tested with Chrome 32

  • Firefox: on version 27 camera seems to work but something goes wrong

Changelog

0.2.0 (2014-02-20)

  • Viewfinder can now be dragged for optimal face position [keul]

  • Face detection support (super-experimental) [keul]

0.1.0 (2013-11-10)

  • Initial release

Release files for collective.takeaportrait 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.takeaportrait 0.2.0
File Size Uploaded
collective.takeaportrait-0.2.0.zip 143.6 kB Details

Release files / collective.takeaportrait-0.2.0.zip

Download URL collective.takeaportrait-0.2.0.zip
Size 143.6 kB
Tags Source
SHA-256 checksum
How to use checksums
85e2ae02dc56ee33b9b6dd228c27858f80ad0f7d9cb60b75cdd18bf1900829a8
BLAKE2b-256 checksum
How to use checksums
029943b4a5321a2bcd8903a22bc3079950f3f54f5b76bf0da0a9fb7b56d20898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page