sensenmercado / jpegcam

Automatically exported from code.google.com/p/jpegcam
GNU Lesser General Public License v3.0
0 stars 0 forks source link

When using webcam.freeze() and a larger "server size", the "frozen" image is the bigger resolution. #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. set document.write( webcam.get_html(320, 240, 800, 600) ); 
2. make a set of buttons like in test2.html
3. press capture

What is the expected output? 

I expect to see the image at the same size as the "preview" video

What do you see instead?

I see the "Server Size"d image. Much too large.

What version of the product are you using? 

1.0.9

On what operating system?

OSX Chrome 9.0

Please provide any additional information below.

Original issue reported on code.google.com by vspeelman on 4 Feb 2011 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, Did you find a work around? Im facing the same issue.

Original comment by thebeani...@gmail.com on 7 May 2011 at 9:00

GoogleCodeExporter commented 8 years ago
I'm having same issue. Any clue? Thanks!

Original comment by duyvest...@gmail.com on 12 May 2011 at 11:11

GoogleCodeExporter commented 8 years ago
Ok guys, I did it (it took me 3 hours).

-Open the Webcam.as file.
-In line 145, BEFORE:

addChild( bmp );

You should add:

bmp.scaleX = video_width / server_width;
bmp.scaleY = video_height / server_height;

So the final code should be:

bmp.scaleX = video_width / server_width;
bmp.scaleY = video_height / server_height;
addChild( bmp );

Thats all.

The uploaded .JPG file will be just the server_width and server_height values, 
but the 'preview' will be video_width and video_height values.

In case you wanna thank me in your code, my site is www.gigabytes.cl :D

Original comment by duyvest...@gmail.com on 13 May 2011 at 4:12

GoogleCodeExporter commented 8 years ago
A release would be nice with this fix included :)

Original comment by czigola@gmail.com on 2 Feb 2012 at 1:06