Hi everyone,
I’m trying to create an application to take pictures from the users’
webcam and save them into the database.
This is my actionscript code :
Code :
- import flash.display.BitmapData;
- localCamera = Camera.get();
- myCam.attachVideo(localCamera);
- var bitmap = new flash.display.BitmapData(320, 240, true,
0x00000000); - this.createEmptyMovieClip(“pic”, 2);
- pic.attachBitmap(bitmap, 20, “auto”, true);
- btn.onRelease = function() {
- lv = new LoadVars();
- lv.tab = new Array();
- for (i=0; i<240; i++) {
-
for (j=0; j<320; j++) {
-
lv.tab.push(bitmap.getPixel(j, i));
-
}
- }
- lv.send(“validate_upload_flash”, “_blank”, “POST”);
- };
And here comes my issue : in PHP, I’d use a imagesetpixel method. But in
RoR, I just don’t know what to do !
Any help ?