| Author |
Message |
|
|
mikouRoux
|
Posted: Wed Dec 23, 2009 1:13 pm |
|
|
| Joined: Fri Feb 13, 2009 3:47 pmPosts: 3 |
Hello,
I wondered if there is a "resize" function for a video. I started my work based on MoviePlayerExample and can't find out how to resize the sample video with the hand at e.g(160x120)
any ideas ? Thanks a lot.
|
|
Top
|
|
|
arturo
|
Posted: Wed Dec 23, 2009 1:57 pm |
|
|
| Site AdminJoined: Wed Apr 11, 2007 1:02 amPosts: 1192Location: barcelona |
if it's just for drawing it, it's so easy as: Code: movie.draw(x,y,160,120);
|
|
Top
|
|
|
mikouRoux
|
Posted: Wed Dec 23, 2009 11:09 pm |
|
|
| Joined: Fri Feb 13, 2009 3:47 pmPosts: 3 |
ow ! That was easy ! So easy that I owe you some apologize for the disturbing  Thanks for the answer. I know stumble on a new problem. I am using "ofVideoPlayer:pixels" to get the value of all the pixels of a the upper horizontal row of my video. I want to use those values to define the color of each line I am tracing between the video and the top of my window. I just got blue or black and white. What's wrong in my code. How to get the color informations ? unsigned char * pixels = vidPlayer.getPixels(); Code: for (int i = 0; i < vidWidth; i+=1) { unsigned char r = pixels[i * 3]; unsigned char g = pixels[i * 3]; unsigned char b = pixels[i * 3]; ofSetColor(r, g, b); ofLine( (vidPositionX - vidWidth / 2 ) + i, 0, (vidPositionX - vidWidth / 2) + i, vidPositionY - vidHeight / 2); }
Thanks in advance. NB : I am amazed by the quickness of openFrameWorks ! :p
|
|
Top
|
|
|
arturo
|
Posted: Wed Dec 23, 2009 11:54 pm |
|
|
| Site AdminJoined: Wed Apr 11, 2007 1:02 amPosts: 1192Location: barcelona |
this: Code: unsigned char r = pixels[i * 3]; unsigned char g = pixels[i * 3]; unsigned char b = pixels[i * 3]; should be: Code: unsigned char r = pixels[i * 3]; unsigned char g = pixels[i * 3+1]; unsigned char b = pixels[i * 3+2];
|
|
Top
|
|
|
mikouRoux
|
Posted: Mon Dec 28, 2009 8:16 pm |
|
|
| Joined: Fri Feb 13, 2009 3:47 pmPosts: 3 |
Thank you very much. Exactly what I was looking for
|
|
Top
|
|
|
Puck
|
Posted: Wed Apr 28, 2010 1:31 pm |
|
|
| Joined: Wed Apr 28, 2010 1:27 pmPosts: 2 |
Try use the program VidCrop PRO, to me has very much helped.
|
|
Top
|
|
|
|