public PImage getReversePImage( PImage image ) {
PImage reverse = new PImage( image.width, image.height );
for( int i=0; i < image.width; i++ ){
for(int j=0; j < image.height; j++){
reverse.set( image.width - 1 - i, j, image.get(i, j) );
}
}
return reverse;
}
No comments:
Post a Comment