Resizing graphic files in Image or Picture Boxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robertko2
    New Member
    • Oct 2007
    • 9

    Resizing graphic files in Image or Picture Boxes

    Hello everyone,

    This is my first post here, and was hoping someone could lead me on the right track to quality resizing of drawing files like .bmp .jpg etc in VB6 Image or Picture boxes. I'm writing a design program and need my width, height and depth variables to influence the size of the graphic files. I need to make them true to scale. Thank you in advance for any help offered.

    Robert
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Try using the image control .with this control you can stretch the image.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Also, you may want to investigate the PaintPicture method.

      Comment

      • robertko2
        New Member
        • Oct 2007
        • 9

        #4
        Originally posted by debasisdas
        Try using the image control .with this control you can stretch the image.
        Thank you for your input. I've been using image controls, but since the image width can vary substancially the stretching and squishing doesn't look very good. I was hoping to find a way to maintain the drawings original quality.

        Robert

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by robertko2
          Thank you for your input. I've been using image controls, but since the image width can vary substancially the stretching and squishing doesn't look very good. I was hoping to find a way to maintain the drawings original quality.
          Depends on what you mean by "quality". If you just want to maintain the aspect ratio, simply adjust the height/width so that they maintain the same proportions.

          For instance, if your original image is 300x150, and you shrink it to half the height (75), then the width should also be halved (150).

          Comment

          Working...