Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I have a image file location, which is for an image approx 3000 pixels x 2000 pixels. This is too big for the use we need it for in the majority of cases, but still need this size of photo for printing a large document off.

    However, is there a way to resize the photo and move a copy of it across to another path. I know how to move files about, etc, but I am not sure on how to get VBA to resize the image to being 800 x 600.

    Help would be appreciated.
    Best Regards,

    Luke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Do you really need to reduce the size of the picture? If you want to display it at reduced size in Access, set the Size Mode property of the image control to Zoom. The picture will automatically be resized to fit in the image control while keeping its aspect ratio.


  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by HansV View Post
    Do you really need to reduce the size of the picture? If you want to display it at reduced size in Access, set the Size Mode property of the image control to Zoom. The picture will automatically be resized to fit in the image control while keeping its aspect ratio.
    Yes, as we store two versions of an image, 400 x 300, 3000 x 2000 (approx). However the smaller version is too pixelated when we ftp it to be dislayed on the web. The large version is great, but bloats the zip file more than necessary, which then takes a long time to ftp it to the web.

    Just wondering if it were possible...
    Best Regards,

    Luke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    A Google search appears to indicate that it's possible, but I have no experience with any of the programs, so I can't offer recommendations.

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Irfanview will resize images, and you can call it from a command line.

    Here are two lines from a place where I use it.

    Code:
    strIrfanviewcommandLine = strIrfanviewLocation & " " & strDataPath & strPhotoRelPath & StrPhotofilename & " /resize=(" & intImageWidth & "," & intImageHeight & ") /aspectratio /convert=" & strDataPath & strPhotoRelPath & StrPhotofilename
    Retval = Shell(strIrfanviewcommandLine, vbHide)
    This runs a hidden copy of irfanview, and resize the photo found found using the path and filename, resizes it to the specified height and wdith, but preserves the aspect ratio, then save the result. (In this case overwriting the original.)

    Irfanview Help lists all the command line switches.
    Regards
    John



Posting Permissions

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