⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getblobid

📁 图像压缩解压的源码
💻
字号:
#!/usr/sww/bin/perl$args = $ARGV[0];# print "Content-type: text/html\n\n";      #  for debugging# print "<html><body>";                     #  for debugging# Get kwid.if ($args =~ /\?/) {	$kwid = $`;	chop($kwid);                        # may not need this	$colrow = $';}# Get row and column of mouse click.if ($colrow =~ /,/) {	$col = $`;	$row = $';}# Get directory name needed for path to read support map.$dir = int($kwid / 100) * 100;$support_map = "/elib/data/images/blobs/".$dir."/".$kwid."/".$kwid."_support.map";# Read support map and put all the elements from it into an array--except# the first two elements, which are the number of columns and rows.$i = -1;open (FH, $support_map) || die "Can't open support map:".$support_map;while (<FH>) {	if($i == -1) {		if($_ =~ /\s/) {			$ncols = $`;			$nrows = $';		}		$i++;	} else {		foreach $num (split(/\s/)) {			$array[$i] = $num;			$i++;		}	}}$blobid = $array[$row * $nrows + $col];## if $blobid == 0, person didn't click on a blob#if($blobid==0) {	print "Content-type: text/html\n\n";	print "<html><body bgcolor=#FFFFFF>";	print "<h1>Oops...</h1>";        print "You didn't click on a blob. (The gray border around ";	print "the image and the thin gray lines are not part of a blob.)<p>";        print "Try again -- click on one of the regions in the Blobworld image.";	print "</html></body>";	return;}if(`pwd` =~ /test/) {	$command = "/elib/sys/test/httpd/cgi-bin/blobs/show_blob $kwid $blobid";} else {	$command = "/elib/sys/httpd/cgi-bin/blobs/show_blob $kwid $blobid";}system("$command");# print "</html></body>";                          # for debugging

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -