PRB: PRB: "Error 481: Invalid Picture" Err Viewing BMP File

ID: Q216205


The information in this article applies to:


SYMPTOMS

Bitmaps created using Win98 Imaging components, such as Imaging for Windows (Win98) or IMGEDIT.OCX, create a BMP that cannot be read in Win95 or NT4 using MSPAINT.EXE or the Visual Basic PictureBox control.

You would receive the folling error message:

Error 481: Invalid Picture When Viewing BMP Created Using Kodak Imaging in Win98


CAUSE

The Win98 Imaging components save out the bitmaps using the v5.0 BITMAPINFOHEADER structure.

Following is the VC++ BITMAPINFOHEADER v5.0 structure:


typedef struct {
   DWORD        bV5Size;
   LONG         bV5Width;
   LONG         bV5Height;
   WORD         bV5Planes;
   WORD         bV5BitCount;
   DWORD        bV5Compression;
   DWORD        bV5SizeImage;
   LONG         bV5XPelsPerMeter;
   LONG         bV5YPelsPerMeter;
   DWORD        bV5ClrUsed;
   DWORD        bV5ClrImportant;
   DWORD        bV5RedMask;
   DWORD        bV5GreenMask;
   DWORD        bV5BlueMask;
   DWORD        bV5AlphaMask;
   DWORD        bV5CSType;
   CIEXYZTRIPLE bV5Endpoints;
   DWORD        bV5GammaRed;
   DWORD        bV5GammaGreen;
   DWORD        bV5GammaBlue;
   DWORD        bV5Intent;
   DWORD        bV5ProfileData;
   DWORD        bV5ProfileSize;
   DWORD        bV5Reserved;
} BITMAPV5HEADER, FAR *LPBITMAPV5HEADER, *PBITMAPV5HEADER; 


The members of this structure, starting with bV5Size through bV5ClrImportant, are the same as those found in a normal BITMAPINFOHEADER structure, which is readable in Win95 and Windows NT. The remainder of the BITMAPINFOHEADER structure contains new members where older applications would expect to find the start of the Color Table.


RESOLUTION

There are three workarounds for this problem:


STATUS

This problem has been reported as a bug to Eastman Kodak, makers of the Imaging controls.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Using the Win98 ImgEdit control, save a BMP image to a file.


  2. Take that file to either a Win95 or Windows NT system. Attempt to load it into either MSPAINT.EXE or the Picture Property of a Visual Basic PictureBox control.


Additional query words:


Keywords          : kb3rdparty kbBitmap kbVBp kbVBp400 kbVBp500 kbVBp600 kbWinOS98 kbGrpVB 
Version           : WINDOWS:4.0,5.0,6.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: June 14, 1999