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 :
1. import flash.display.BitmapData;
2. localCamera = Camera.get();
3. myCam.attachVideo(localCamera);
4.
5. var bitmap = new flash.display.BitmapData(320, 240, true,
0x00000000);
6. this.createEmptyMovieClip("pic", 2);
7. pic.attachBitmap(bitmap, 20, "auto", true);
8. btn.onRelease = function() {
9. lv = new LoadVars();
10. lv.tab = new Array();
11. for (i=0; i<240; i++) {
12. for (j=0; j<320; j++) {
13. lv.tab.push(bitmap.getPixel(j, i));
14. }
15. }
16. lv.send("validate_upload_flash", "_blank", "POST");
17. };
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 ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---