+ Reply to Thread
Results 1 to 3 of 3

can I maintain aspect ratio when inserting pictures

  1. #1
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    can I maintain aspect ratio when inserting pictures

    I am using the code below to insert pictures in my spreadsheet. this code resizes the pictures slightly smaller than the target cell and positions it to line up with the top and left hand size. This works fine for pictures that have been taken in landscape mode (as the cells have been resized to accomodate this). However if a picture has been taken in Portrait (camera rotated by 90deg.) then the aspect ratio of the imported picture gets badly distorted as it it stretched widthways to fill the cell.
    One way I think it could be done would be if the ratio of width to height could be checked at the point marked in the code below then two seperate resize/insert sections of code could be used. However I don't know how to check the size of the picture after it has been inserted or if ths is even possible.
    Any thoughts?

    Please Login or Register  to view this content.
    Last edited by tryer; 09-07-2010 at 09:41 AM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: can I maintain aspect ratio when inserting pictures

    You could use this code:

    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    Smile Re: can I maintain aspect ratio when inserting pictures

    That works a treat

    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1