Results 1 to 5 of 5

Thread: working with uploaded images

  1. #1

    Thread Starter
    Hyperactive Member Rocketdawg's Avatar
    Join Date
    Feb 2003
    Location
    Back in the doghouse
    Posts
    294

    working with uploaded images

    Hi there


    I'm working on a form that uploads images (they eventually get loaded to a database). I've created a directory and then subfolder (myimages) to hold the uploaded images.

    I can determine on upload if the pictures are too large and/or of the right type (jpg, gif). So far so good.

    Now the frustrating part.........

    I can get the dimensions of the uploaded picture as single or integer (creating a bitmap representation and getting width & height).

    I feel really stupid (noobie issues), but how do I assign height and width to an image control on the form - It's in units.

    Be Kind and thank you!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: working with uploaded images

    Might sound a little simple, but why do you need to set its height and width? Shouldn't the image show up in its original size automatically?

    Second, the image control does have a height and width property.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: working with uploaded images

    Example:

    Me.imgDept.Height = New WebControls.Unit(25)

  4. #4

    Thread Starter
    Hyperactive Member Rocketdawg's Avatar
    Join Date
    Feb 2003
    Location
    Back in the doghouse
    Posts
    294

    Re: working with uploaded images

    mendhak

    Thanks for the reply!

    WebControls.Unit() seems to want to be passed an integer (integer value to represent a # of pixels), but #@*! it won't take it. Maybe its a Visual Studio thing? Says units can't be converted to integer right after it asks for one!

    Anyway, I'll figure out a workaround in the design.

    Thanks Again

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: working with uploaded images

    What code did you try? Did you see my second post?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width