タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

画像処理に関するpikioのブックマーク (1)

  • PerlとGDで画像生成

    静的な画像表示 まず、CGI で静的な画像ファイルを出力する方法を説明しましょう (画像は 東京発フリー写真素材集 から拝借しました)。 image-1.cgi (実行結果) 1: #!/usr/local/bin/perl 2: 3: # $Id: image-1.cgi,v 1.1 2004/06/25 17:30:47 zxr400 Exp $ 4: 5: my $imgfile = '../../img/tokyo-tower.jpg'; 6: my $imgsize = (stat($imgfile))[7]; 7: 8: print "Content-type: image/jpeg\n"; 9: print "Content-Length: $imgsize\n"; 10: print "\n"; 11: 12: binmode(STDOUT); 13: 14: open(I

  • 1