You could take the file and read it into a bitmap object and use
yourbitmap.getthumbnailimage(intWidth,intHeight,no thing,nothing) , to put
the image into a thumbnail and resize it then use
the system.drawing.image save method ie yourbitmap.save("strfileandpath",
ImageFormat.Jpeg)
Something like this
dim myNewImage as system.drawing.image
mynewimage = mggetthumbnail(strFileLoc,intWidth,intHeight)
mynewimage.save(strSaveFileLoc,ImageFormat.Jpeg)
Function mgGetThumbNail(strFile as string, intWidth as integer, intHeight as
integer) as system.drawing.image
Dim myBitmap As bitmap = New Bitmap(strFile)
return mybitmap.getthumbnailimage(intWidth,intHeight,noth ing,nothing)
End Function
"RCIC" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
I want to upload a file to my website. I'd like to
compress the file on upload so when I redisplay the file
on a website it is as small possible. Is their an easy
way to compress jpgs in .Net?