浏览文件夹下面所有图片

2019-04-02 21:27:31刘景俊

    case   "FFD8FF":
      do   
        do:   p1=binVal(aso.Read(1)):   loop   while   p1=255   and   not   aso.EOS
        if   p1>191   and   p1<196   then   exit   do   else   aso.read(binval2(aso.Read(2))-2)
        do:p1=binVal(aso.Read(1)):loop   while   p1<255   and   not   aso.EOS
      loop   while   true
      aso.Read(3)
      ret(0)="JPG"
      ret(2)=binval2(aso.Read(2))
      ret(1)=binval2(aso.Read(2))
    case   else:
      if   left(Bin2Str(bFlag),2)="BM"   then
        aso.Read(15)
        ret(0)="BMP"
        ret(1)=binval(aso.Read(4))
        ret(2)=binval(aso.Read(4))
      else
        ret(0)=""
      end   if
    end   select
    ret(3)="width="""   &   ret(1)   &"""   height="""   &   ret(2)   &""""
    getimagesize=ret
  End   Function 
Function   readX(pic_path)
      Set   fso1   =   server.CreateObject("Scripting.FileSystemObject")
      Set   f1   =   fso1.GetFile(pic_path)
      ext=fso1.GetExtensionName("."&pic_path)
      select   case   UCase(ext)
          case   "GIF","BMP","JPG","PNG":
        arr=getImageSize(f1.path)
        readX   =   arr(1)
          case   "swf"
        arr=pp.getimagesize(f1.path)