Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Nando Leads

resolução de foto?

Recommended Posts

alguem sabe de uma maneira de no momento do upload diminuir a resolução da foto??

 

aqui esta o meu codigo para fazer upload::

 

 

<%Sub BuildUploadRequest(RequestBin)on error resume nextPosBeg = 1PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(34)))boundary = MidB(RequestBin, PosBeg, PosEnd - PosBeg)BoundaryPos = InStrB(1, RequestBin, boundary)Do Until (BoundaryPos = InStrB(RequestBin, boundary & getByteString("--")))Dim UploadControlSet UploadControl = CreateObject("Scripting.Dictionary")Pos = InStrB(BoundaryPos, RequestBin, getByteString("Content-Disposition"))Pos = InStrB(Pos, RequestBin, getByteString("name="))PosBeg = Pos + 6PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(34)))Name = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))PosFile = InStrB(BoundaryPos, RequestBin, getByteString("filename="))PosBound = InStrB(PosEnd, RequestBin, boundary)If PosFile <> 0 And (PosFile < PosBound) ThenPosBeg = PosFile + 10PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(34)))FileName = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))UploadControl.Add "FileName", FileNamePos = InStrB(PosEnd, RequestBin, getByteString("Content-Type:"))PosBeg = Pos + 14PosEnd = InStrB(PosBeg, RequestBin, getByteString(Chr(13)))ContentType = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))UploadControl.Add "ContentType", ContentTypePosBeg = PosEnd + 4PosEnd = InStrB(PosBeg, RequestBin, boundary) - 2Value = MidB(RequestBin, PosBeg, PosEnd - PosBeg)ElsePos = InStrB(Pos, RequestBin, getByteString(Chr(13)))PosBeg = Pos + 4PosEnd = InStrB(PosBeg, RequestBin, boundary) - 2Value = getString(MidB(RequestBin, PosBeg, PosEnd - PosBeg))End IfUploadControl.Add "Value", ValueUploadRequest.Add Name, UploadControlBoundaryPos = InStrB(BoundaryPos + LenB(boundary), RequestBin, boundary)LoopEnd SubFunction getByteString(StringStr)For i = 1 To Len(StringStr)Char = Mid(StringStr, i, 1)getByteString = getByteString & ChrB(AscB(Char))NextEnd FunctionFunction getString(StringBin)getString = ""For intCount = 1 To LenB(StringBin)getString = getString & Chr(AscB(MidB(StringBin, intCount, 1)))NextEnd FunctionbyteCount = Request.TotalBytesRequestBin = Request.BinaryRead(byteCount)Set UploadRequest = CreateObject("Scripting.Dictionary")BuildUploadRequest RequestBin%>

ele funciona normalmente, mas quero acrescentar uma maneira de diminuir a resolução da foto antes de salvar?!!

se alguem solber de uma maneira agradesso!!!!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

utilize componentes tipo o aspjpeg, com ele você consegue mudar algumas propriedades da imagem

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.