Results 1 to 3 of 3

Thread: Image aspect ratio formula

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    75

    Image aspect ratio formula

    Does anyone know what the calculation is for working out the new height when an image is resized while maintaining aspect ratio?

    I am doing this manually so just need the formula.

    thanks!

  2. #2

    Thread Starter
    Lively Member
    Join Date
    May 2003
    Posts
    75
    That's ok, I figure it out.

    width * (height/width)

  3. #3
    Addicted Member Sheppe's Avatar
    Join Date
    Sep 2002
    Location
    Kelowna, BC
    Posts
    245
    aspect = oldwidth/newwidth
    newheight=oldheight/aspect
    [vbcode]
    On Error Goto Hell
    [/vbcode]
    Sheppe Pharis, MCSD
    Check out http://www.vb-faq.com
    Click here for access to the free Code-Express source code and component sharing network for VB6
    Want a better way to skin your .NET applications? Click here!

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