We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › PImage array
Page Index Toggle Pages: 1
PImage array (Read 676 times)
PImage array
Mar 19th, 2010, 6:37am
 
I am making a panoramic view with 100 pictures and want to use PImage array, but it doesnt work.

can anybody help me to find out what is wrong with my scripting?

Code:

 PImage[] im = new PImage[4];

 im[1] = loadImage( "pictures/" + 1 + ".jpg" ) ;
 im[2] = loadImage( "pictures/" + 2 + ".jpg" ) ;  
 im[3] = loadImage( "pictures/" + 3 + ".jpg" ) ;  

 image (im[1], 100+10, 10) ;  
 image (im[2], 100+20, 10) ;  
 image (im[3], 100+30, 10) ;



this one above works but the one below doesn't.


Code:

PImage[] im = new PImage[101];

for(int i = 1; i > 100 + 1; i++)
 {
   im[i] = loadImage( "pictures/" + i + ".jpg" ) ;
   image (im[i], 100 + 10*i, 10) ;    
 }


Re: PImage array
Reply #1 - Mar 19th, 2010, 6:57am
 
> = <

edit : this is not a smiley  Smiley
nothing in your loop get executed cause you have to change > to <
Re: PImage array
Reply #2 - Mar 19th, 2010, 7:09am
 

wow... it is the most stupid mistake.
such a shame....

thank you for your kindness.
and sorry about my silly question.
Page Index Toggle Pages: 1