FIX: JPG in Image or PictureBox Control Doesn't Display Properly

ID: Q173213


The information in this article applies to:
  • Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0


SYMPTOMS

When you display a JPG file in a PictureBox or Image control, the bottom row of pixels is a different color. It looks like a line has been drawn across the bottom of the image.


RESOLUTION

This problem only effects JPG images. One solution is to convert the image to a different format. For example, you can use the Wang Imaging software that comes with Windows NT 4.0 or the Microsoft Photo Editor available with Microsoft Office 97 to convert the file format.

Alternatively, you can use a control other than the PictureBox or Image to display the picture. The OLE Control does not exhibit this problem.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual Basic 6.0.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new "Standard EXE" project in Visual Basic 5.0.


  2. Place a PictureBox control and an Image control on Form1.


  3. Set the picture property of both controls to a file in JPG format.


  4. Increase the size of both controls so that they are larger than the image.


  5. Set the Stretch property of the Image control to true. (This is not necessary to reproduce the problem but it does make it easier to see.)


  6. Run the project.


  7. Notice the line that appears across the bottom of both images.


Additional query words: jpeg

Keywords : kbCtrl kbVBp500bug kbVBp600fix
Version : WINDOWS:5.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: June 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.