#!/bin/perl require "getopts.pl" ; $frame_xcount= 8 ; $frame_ycount= 8 ; $frame_width =80 ; $frame_height=60 ; $outfile ="all.jpg" ; $infname="-" ; do Getopts('W:H:X:Y:o:h:'); if( $opt_W ne "" ){ $frame_width =int($opt_W) ; } if( $opt_H ne "" ){ $frame_height=int($opt_H) ; } if( $opt_X ne "" ){ $frame_xcount=int($opt_X) ; } if( $opt_Y ne "" ){ $frame_ycount=int($opt_Y) ; } if( $opt_o ne "" ){ $outfile = $opt_o ; } if( $opt_h ne "" ){ &Help() ; exit(0) ;} $img_width =$frame_width *$frame_xcount ; $img_height =$frame_height*$frame_ycount ; printf("resize size=%d,%d\n",$img_width,$img_height) ; printf("clear col=255,255,255 attr=0\n") ; $x=0 ; $y=0 ; open( infile,$infname ) ; while( ){ chop ; printf("load %s pos=%d,%d\n",$_,$x,$y) ; $x += $frame_width ; if( $x>=$img_width ){ $x=0 ; $y += $frame_height ; } } printf("save %s q=80\n",$outfile) ; exit(0) ; sub Help{ print "Generate layman script for animation frame tilling Ver0.00 TANE 2003\n" ; print "Option\n" ; print " -X n : X frame count\n" ; print " -Y n : Y frame count\n" ; print " -W n : frame width\n" ; print " -H n : frame height\n" ; print " -h : print this help\n" ; }