Importing Bitmaps: Determining Size and Memory Requirements

ID: Q132271


The information in this article applies to:


SUMMARY

When you try to import a bitmap graphic, you may get an out-of-memory message, even if the file size of the bitmap is relatively small. When Publisher, Word, or PowerPoint imports a bitmap graphic, the graphic is uncompressed in memory before it is imported. Therefore, there must be an amount of RAM available equal to or greater than the size of the uncompressed bitmap graphic.

This article provides information on how to determine how much memory is required to import bitmap images of various sizes.


MORE INFORMATION

Every bitmap-type graphic (TIFF, PCX, BMP, GIF, and so on) is simply a rectangular array of numbers with the numerical value indicating the color of each pixel. To save space on disk, many bitmap-creation programs perform compression on the data. Each particular graphic format provides different options for compressing data. When a Microsoft program imports a file, the graphic is uncompressed in memory before it is imported. If there is not enough RAM available to hold the uncompressed graphic, the import operation fails and returns an out-of-memory message.

How to Determine the Uncompressed Size of a Bitmap

  1. Multiply the bitmap's horizontal dimension in pixels by the vertical dimension in pixels to find the total number of pixels. Thus, a 640 x 480 bitmap has 307200 pixels.


  2. Multiply the total number of pixels by the number of bytes per pixel:
    
          1-bit (8-color) image has 1/8 bytes per pixel (x 0.125)
          4-bit (16-color) image has 1/2 bytes per pixel (x 0.5)
          8-bit (256 color or grayscale) image has 1 byte per pixel (x 1)
          24-bit image has 3 bytes per pixel (x 3)
          32-bit image has 4 bytes per pixel (x 4) 
    For example:



Special Case

Microsoft PowerPoint 97 for Windows and Microsoft Word 97 can import graphics in the Joint Photographic Expert Group (JPEG) and Portable Network Graphics (PNG) formats without decompressing them first. You can therefore import graphics that contain more data into these two programs if you use these formats.

Additional query words: 1.00 1.10 1.10a 2.00 2.00a 2.00a-cd 2.00b 2.00c 6.00 6.00a 6.00c winword 3.00 4.00 hang slow raster disk space free memory crash load picture clipart insert large bitmap tiff gif bmp pcx out of not enough insufficient low compressed word6 compress


Keywords          : kbgraphic 
Version           : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,3.0,4.0,6.0,6.0a,6.0c,7.0,97
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: July 22, 1999