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.
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.
if it’s just for drawing it, it’s so easy as:
movie.draw(x,y,160,120);
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();
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 !
this:
unsigned char r = pixels[i * 3];
unsigned char g = pixels[i * 3];
unsigned char b = pixels[i * 3];
should be:
unsigned char r = pixels[i * 3];
unsigned char g = pixels[i * 3+1];
unsigned char b = pixels[i * 3+2];
Thank you very much. Exactly what I was looking for
Try use the program VidCrop PRO, to me has very much helped.