i made this component to take snapshot for a community website. i think it's useful so i'm sharing it here. In this version save to server function is disabled but you can do it with takeSnap() method or encodeJpeg(),encodePng();
Small outline About Class
properties
- imageFormat jpeg,png
- saveType URL,LOCAL
- showToolBar true,false
- saveImage() Save the image to local or to url according to saveType property
- attachCamera(camindex="0") change Camera
- takeSnap() Return Bitmap data from camera
- encodeJpeg(quality) you can pass the quality 1 to 100 it will return byteArray of jpeg image
- encodePng() return png image byteArray
Actionscript 3.0 sample code
import com.anilmathewm.camera.*
var snap:SnapShot=new SnapShot();
addChild(snap);
snap.imageFormat="png"
snap.saveType="LOCAL"
snap.showToolBar=true;
Demo Link: http://actionscript.co.in/snapshot/camsmap_sample2.html
Downlands
download MXP Component
download SWC component
download Sample FLA
2 comments:
Thank You so much for this solution, you have really made my day a great one.
But one other thing I would like you to explain is how to pass the picture data to php and save it on the server.
Thank You once again.
Great work! Is there any chance you could post the source code so we can view the implementation?
Post a Comment