最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP判断gif图像尺寸的方法
时间:2022-07-03 00:00:43 编辑:袖梨 来源:一聚教程网
这里是我根据gif图像格式想出来的判断gif图像尺寸的方法,请大家给点意见
up.htm
< html >
< body >
< form action="up.asp" ENCTYPE="multipart/form-data" method="post" >
< table border=0 % cellspacing="0" >
< tr >
< td >请选择您要上传的gif图片:< /td >
< td >< input type="file" name="pic" style="font-size:10pt;" >< /td >
< /tr >
< /table >
< p align="center" >< input type="submit" value="提交" style="font-size:9pt;background-color:#54B060;color:white;" >
< /form >
< /body >
< /html >
up.asp
< %
FormSize = Request.TotalBytes
FormData = Request.BinaryRead( FormSize )
bncrlf=chrb(13) & chrb(10)
divider=leftb(formdata,instrb(formdata,bncrlf)-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
Image=midb(formdata,datastart,dataend)
head_version = Ascb( midb( Image,1,3 ) )
head_subversion = Ascb( midb( Image,4,3 ) )
head_width_l = Ascb( midb( Image,7,1 ) )
head_width_h = Ascb( midb( Image,8,1 ) )
head_height_l = Ascb( midb( Image,9,1 ) )
head_height_h = Ascb( midb( Image,10,1 ) )
head_colors = Ascb( midb( Image, 11, 1 ) )
head_width_h = head_width_h * 256
head_height_h = head_height_h * 256
head_colors = head_colors And &H07
Response.Write "图像大小为" & head_width_h + head_width_l & "x" & head_height_h + head_height_l _
& "x" & 2^( head_colors + 1 )
% >
原作者:jaklin
up.htm
< html >
< body >
< form action="up.asp" ENCTYPE="multipart/form-data" method="post" >
< table border=0 % cellspacing="0" >
< tr >
< td >请选择您要上传的gif图片:< /td >
< td >< input type="file" name="pic" style="font-size:10pt;" >< /td >
< /tr >
< /table >
< p align="center" >< input type="submit" value="提交" style="font-size:9pt;background-color:#54B060;color:white;" >
< /form >
< /body >
< /html >
up.asp
< %
FormSize = Request.TotalBytes
FormData = Request.BinaryRead( FormSize )
bncrlf=chrb(13) & chrb(10)
divider=leftb(formdata,instrb(formdata,bncrlf)-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
Image=midb(formdata,datastart,dataend)
head_version = Ascb( midb( Image,1,3 ) )
head_subversion = Ascb( midb( Image,4,3 ) )
head_width_l = Ascb( midb( Image,7,1 ) )
head_width_h = Ascb( midb( Image,8,1 ) )
head_height_l = Ascb( midb( Image,9,1 ) )
head_height_h = Ascb( midb( Image,10,1 ) )
head_colors = Ascb( midb( Image, 11, 1 ) )
head_width_h = head_width_h * 256
head_height_h = head_height_h * 256
head_colors = head_colors And &H07
Response.Write "图像大小为" & head_width_h + head_width_l & "x" & head_height_h + head_height_l _
& "x" & 2^( head_colors + 1 )
% >
原作者:jaklin
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21