Importing Bitmaps: Determining Size and Memory Requirements

Last reviewed: May 9, 1997
Article ID: Q132271

Information in this article applies to:
  • Microsoft PowerPoint 97 for Windows
  • Microsoft PowerPoint for Windows 95, version 7.0
  • Microsoft PowerPoint for Windows, versions 3.0, 4.0
  • Microsoft Publisher 97 for Windows
  • Microsoft Publisher for Windows 95, version 3.0
  • Microsoft Publisher, versions 1.0, 2.0
  • Microsoft Word 97 for Windows
  • Microsoft Word for Windows 95, version 7.0
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

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.


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 memory not enough memory insufficient memory low memory
compressed word6 compress
Keywords : kbgraphic kbgraphic
Version : 1.0 2.0 3.0 4.0 6.0 7.0 97
Platform : WINDOWS
Hardware : x86


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.

Last reviewed: May 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.