c# - Resize my image on upload not working - what must my buffer be? -


This is the code I received from

I want the user to upload a photo and then resize .............

  public sub Risfrem stream (byline image as Sevpth string, integer as by Val Maksswaid Saijyug, by Whal buffer system. as Aiosstrym) dim Intnvevthth fixtures integer dim imgInput as intNewHeight dim System.Drawing.Image = System.Drawing.I mage.FromStream (buffer) determines fixed image format dim fmtImageFormat as ImageFormat = imgInput.RawFormat '' As Integer = image as imgInput.Width original width and height intOldHeight get dim intOldWidth dim int = imgInput.Height, either landscape or portrait dim intMaxSide integer as (intOldWidth & gt; = intOldHeight) then intMaxSide = intOldWidth otherwise intMaxSide = intOldHeight end if (intMaxSide & gt; MaxSideSize) followed by 'new width and height set as dim dblCoef double In = MaxSideSize / CDbl (intMaxSide) intNewWidth = Convert.ToInt32 (dblCoef * int OldWidth) intNewHeight = Convert.ToInt32 (dblCoef * intOldHeight) otherwise intNewWidth = intOldWidth intNewHeight = intLightHeight end if used to create new bitmap dim bmpResized Drawing.Bitmap = New Drawing.Bitmap (imgInput, intNewWidth, intNewHeight) resources used for release imgInput.Dispose () bmpResized.Dispose () Buffer.Close () End Sub  'disc bmpResized.Save (ImageSavePath, fmtImageFormat) to save the bitmap to' 

now when I click on the button Please submit my this will have to execute my code, but I'm not sure what the input buffer should be for the field I am God?

  SAFE sub btnUpload_Click () handles btnUpload.Click ResizeFromStream ( "~ Pics", 200, ??????????) End Sub  
< P> Thanks advance!

Edit I need to get my image with file upload control!

The file gets a stream for file content from the Ad.FileContent.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -