RENAME (originalimage) TO (interimfile) RENAME (optimizedimage) TO (originalimage) DELETE FILE interimfileThe .Net code inside the webpage creates new Bitmap object from the specified file.
Dim b As Bitmap = New Bitmap(originalimage)or
Dim fs as FileStream = New FileStream(originalimage, FileMode.Open) Dim b As Bitmap = New Bitmap(fs)Image's dimensions can be obtained from Bitmap's Width and Height properties. I need to know them for scaling the image on the web page by setting the Width and Height values inside IMG HTML tag.
hFile = FOPEN(originalimage, 1) = FCHSIZE(hFile, 0) && truncates the file = FWRITE(hFile, FILETOSTR(optimizedimage)) = FCLOSE(hFile)