Importing Bitmaps: Determining Size and Memory Requirements (132271)



The information in this article applies to:

  • Microsoft PowerPoint 97 for Windows
  • Microsoft PowerPoint for Windows 95
  • Microsoft Word for Windows 1.1
  • Microsoft Word for Windows 1.1a
  • Microsoft Word for Windows 2.0
  • Microsoft Word for Windows 2.0a
  • Microsoft Word for Windows 2.0b
  • Microsoft Word for Windows 2.0c
  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a
  • Microsoft Word for Windows 6.0c
  • Microsoft Word for Windows 95
  • Microsoft Word 97 for Windows
  • Microsoft Publisher 97 1.0
  • Microsoft Publisher for Windows 3.0
  • Microsoft PowerPoint for Windows 3.0
  • Microsoft PowerPoint for Windows 4.0

This article was previously published under Q132271

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:

    • A 640 x 480 8-bit bitmap has an uncompressed size of about 307,200 bytes.
    • A 640 x 480 24-bit bitmap has an uncompressed size of about 921,600 bytes.
    • A 2000 x 2500 pixel 24-bit TIFF requires about 15 MB of RAM to import, even if the size of the file on disk is only 600K.

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.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbgraphic KB132271