判断gif图像尺寸的方法

2016-01-29 18:26 3 1 收藏

判断gif图像尺寸的方法,判断gif图像尺寸的方法

【 tulaoshi.com - ASP 】

  这里是我根据gif图像格式想出来的判断gif图像尺寸的方法,请大家给点意见

up.htm

<html
<body
<form action="up.asp" ENCTYPE="multipart/form-data"  method="post"
<table border=0 width=100% cellspacing="0"
  <tr
    <td width="30%"请选择您要上传的gif图片:</td
    <td width="70%"<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 )
    

%

 

来源:https://www.tulaoshi.com/n/20160129/1505773.html

延伸阅读
标签: PS PS教程
这里给大家提供一个图像实例,为了计算与讲解的方便,我将这幅图像设定为每厘米100像素分辨率(注意: 是厘米不是英寸),图像尺寸为: 10厘米X5厘米 这张图像是每行1000个像素,一共500行。由此可知:10000X500=500000,这张图像由50万个像素组成,在每厘米100像素的分辨率下,图像的尺寸为10cmX5cm 如果将图像尺寸扩大一倍,可...
卡地亚戒指怎么看尺寸  卡地亚品牌想必都已经听说过,卡地亚里面的饰品个个都相当的昂贵,当然了贵自然有贵的理由,其中卡地亚戒指还是非常好看受人欢迎的,当然了就有人问了如果买戒指的时候不小心买大了或者买小了怎么办呢?下面我们就和爱秀美小编一起来看看吧 ! 你可用卷尺 ,测量手指尺寸。 与接口边缘齐平的数字就是 “内圈尺寸”...
gif快手添加好友方法   现在,gif动图已经成为很多人聊天中不可或缺的一部分了。而gif快手相信也有很多人在使用,那么,今天,小编就给大家带来gif快手添加好友方法,希望能对大家有所帮助。 1)首先打开GIF快手,在首页选择好友短视频,进入界面在右上方点击。(如下图) 2)在界面点击,显示正在关注即可。(如下图)
在android中做图像镜像有很多方法,今天算是学习了! 两种方法如下 : 代码如下: //方法一 Matrix matrix = new Matrix(); matrix.postScale(leftOrRight, 1, bmpW/2, bmpH/2);//前两个是xy变换,后两个是对称轴中心点 matrix.postTranslate(x, y); canvas.drawBitmap(bmpLuffy[0], matrix, paint); //方法二 // canvas.save(); //...
1.图像平移 图像平移只是改变图像在屏幕上的位置,图像本身并不发生变化。 !-- frame contents -- !-- /frame contents -- 假设原图像区域左上角坐标为(x0, y0),右下角坐标为(x1, y1),将图像分别沿x和y轴平移dx和dy,则新图像的左上角坐标为(x0 +dx, y0+dy),右下角坐标为(x1+dx, y1+dy)。坐标平移变换公...

经验教程

148

收藏

87
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部