Checking image width during uploading process.

Last post 07-05-2009 6:55 PM by aibip. 2 replies.

Sort Posts:

  • Checking image width during uploading process.

    07-05-2009, 3:34 PM
    • Member
      7 point Member
    • aibip
    • Member since 05-05-2009, 1:38 PM
    • Posts 53

    Is there any ways to check image width during uploading process?

    I got image resize script, so I just need to know the if statement. (following statement in bold)


    something like..
    If uploading image width > 640 then
         resize image and save
    else
        save
    end if


    Thank you

  • Re: Checking image width during uploading process.

    07-05-2009, 6:02 PM
    • Star
      11,839 point Star
    • shahed.kazi
    • Member since 07-09-2008, 2:15 AM
    • Sydney, Australia
    • Posts 2,328

    http://www.freevbcode.com/ShowCode.asp?ID=112

  • Re: Checking image width during uploading process.

    07-05-2009, 6:55 PM
    Answer
    • Member
      7 point Member
    • aibip
    • Member since 05-05-2009, 1:38 PM
    • Posts 53

    I think I figure it out.

    Dim originalBMP As New System.Drawing.Bitmap(FileField.FileContent)
    If originalBMP.Width > 640 Then

    resize

    end if

Page 1 of 1 (3 items)