random/resize image sequences when using ofxImagesequence


Sorry that I am a beginner of openframeworks as well as programming. I have a project which I want to place animation sequences with different rotation, position and also size/scale. And they are interact with mouse position (which I was using ofxInteractiveObject), for the rotation, position part I think it’s fine. But I can’t find the solution for the resize part.

So if I want to resize/random the size of image sequences, how can I do it in ofxImagesequence?

Thanks a lot.


Try something like this:

testApp::draw() {  
  float scale = ofRandomuf()*2.0;  
  ofTranslate(x,y,0); // move to where you want to draw  
  ofScale(scale, scale, scale); // scale the viewport randomly from 0 to 2  
  yourImageHere.draw(0,0); // draw at 0,0 since we've already translated  

Hello Tim, I got it, really thanks a lot : )