How to judge the size of GIF image

Source: Internet
Author: User
How to judge the size of GIF image




Here is my GIF image format to determine the size of the GIF image, please give some advice

Up.htm

<body>
<form action= "up.asp" enctype= "Multipart/form-data" method= "POST" >
<table border=0 width=100% cellspacing= "0" >
<tr>
&LT;TD width= "30%" > Please select the GIF image you want to upload:</td>
&LT;TD width= "70%" ><input type= "file" name= "pic" style= "FONT-SIZE:10PT;" ></td>
</tr>
</table>
<p align= "center" ><input type= "Submit" value= "submitted" style= "Font-size:9pt;background-color: #54B060; color: White; " >
</form>
</body>


Up.asp

<%

Formsize = Request.TotalBytes
FormData = Request.BinaryRead (formsize)

BNCRLF=CHRB (+) & 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 "Image size is" & Head_width_h + head_width_l & "x" & Head_height_h + head_height_l _
& "X" & 2^ (head_colors + 1)


%>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.