Microsoft KB Archive/132271

= Importing Bitmaps: Determining Size and Memory Requirements =

Article ID: 132271

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft PowerPoint 97 Standard Edition
 * Microsoft PowerPoint 95 Standard Edition
 * Microsoft Word 1.1 Standard Edition
 * Microsoft Word 1.1 Standard Edition
 * Microsoft Word 2.0 Standard Edition
 * Microsoft Word 2.0a
 * Microsoft Office Word 2003
 * Microsoft Word 2.0c
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 97 Standard Edition
 * Microsoft Publisher 97 Standard Edition
 * Microsoft Publisher 3.0 Standard Edition
 * Microsoft PowerPoint 3.0 Standard Edition
 * Microsoft PowerPoint 4.0 Standard Edition

-



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
 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.  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. </li></ol>

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 KB132271

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.