Using Webcam take photo and save to server with PHP5?

308 views
Skip to first unread message

xhe

unread,
Nov 15, 2009, 9:37:06 PM11/15/09
to ActionScript 3 Core Library
Hi All,

I want to use user's webcam to take their avatar and then upload to
web server which is using PHP5. I searched a lot but can not find the
open source for free download.

Can anyone suggest the link that can show me how to use AS3 to capture
user's head photo and then upload to webserver? Any source code that I
can use?

Thanks

Paul Feakins

unread,
Nov 18, 2009, 3:23:43 PM11/18/09
to as3co...@googlegroups.com
Hi there,

Once you have your webcam showing on the screen, you can use BitmapData.draw() on it.

This link will show you how to save that to the server via PHP:
http://www.quietless.com/kitchen/upload-bitmapdata-snapshot-to-server-in-as3/

Hope that helps!

Paul.
www.AntropyConsulting.com


2009/11/16 xhe <hexu...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "ActionScript 3 Core Library" group.
To post to this group, send email to as3co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/as3corelib?hl=.



Frank He

unread,
Nov 18, 2009, 3:26:13 PM11/18/09
to as3co...@googlegroups.com
Thanks. I have already figured this out.

But one more thing, if I want to crop the image, do you think it is better to use rect parameter for bitmapdata.draw() or use imagemagick to crop?

Hope to hear your suggestions

For more options, visit this group at http://groups.google.com/group/as3corelib?hl=en.

Paul Feakins

unread,
Nov 18, 2009, 3:41:23 PM11/18/09
to as3co...@googlegroups.com
Ahh, sorry I didn't reply sooner, it might have saved you some time.

I personally think it would be better to crop in AS3 because then you're sending less data from the client to the server. It could definitely be done either way though!

2009/11/18 Frank He <hexu...@gmail.com>

Frank He

unread,
Nov 18, 2009, 3:47:06 PM11/18/09
to as3co...@googlegroups.com
do you have any idea about the rect parameter? Are they the actual pixles from top left point on the image and width/height?

Paul Feakins

unread,
Nov 18, 2009, 4:15:30 PM11/18/09
to as3co...@googlegroups.com
Yes, I think that sounds about right:

x
, y, width, and height

2009/11/18 Frank He <hexu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages