DOCUMENT:Q173213 28-AUG-1997 [vbwin] TITLE :BUG: JPG in Image or PictureBox Control Doesn't Display Properly PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS:PgmCtrlsStd ====================================================================== --------------------------------------------------------------------- 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. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. 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. ====================================================================== Keywords : PgmCtrlsStd Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1997.