# \*BITMAP\* Virtual Bitmap

> Source: https://manual.pvxplus.com/file-handling/bitmap

## Format

**OPEN** *(chan)*"**\*BITMAP\***"**\[**;*options*\]

***Where:***

|  |  |
| --- | --- |
| *chan* | Channel or logical file number (e.g. OPEN (1)"\*BITMAP\*"). |
| *options* | The following options are supported following **\*BITMAP\***:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **DPI**=*nnn* \| Image resolution in dots per inch. The value given must be greater than 0. If not specified, the default is 120. \|<br>\| **LENGTH**=*nnn*.*nn* \| Image height in inches (to 2 decimal places). If not specified, the default is 11.<br>The length can also be suffixed by ***mm*** (indicating millimeters), ***in*** (indicating inches) or ***px*** (indicating pixels).<br>*(The ability to indicate pixels was added in PxPlus 2019.)* \|<br>\| **ORIENTATION={LANDSCAPE \\| PORTRAIT}** \| Swaps the width and length (rotates the image). If not specified, the default is **PORTRAIT**. \|<br>\| **WIDTH**=*nnn*.*nn* \| Image width in inches (to 2 decimal places). If not specified, the default is 8.5.<br>The width can also be suffixed by ***mm*** (indicating millimeters), ***in*** (indicating inches) or ***px*** (indicating pixels).<br>*(The ability to indicate pixels was added in PxPlus 2019.)* \| |
| **\*BITMAP\*** | Keyword, not case-sensitive. Special interface, enclosed in quotation marks within the **[OPEN](https://manual.pvxplus.com/directives/open)** directive. (Include **\*** *asterisks* in syntax) |

## Description

Note:  
\*BITMAP\* is supported for use in *Windows only*.

**\*BITMAP\*** is a special file for generating a 24-bit colour bitmap image in memory. You can open this file and PRINT an image to it, just as you would using **[\*WINPRT\*](https://manual.pvxplus.com/file-handling/winprt)**. The generated image can then be printed either to the screen or to the printer using the **['PICTURE'](https://manual.pvxplus.com/mnemonics/picture)** mnemonic.

Warning!  
24-bit colour at high DPI (resolution) can use very large amounts of memory. If there are insufficient operating system resources available, the result will be an Error #15: Operating system command failed.

## See Also

**['PICTURE' Define/Draw Picture](https://manual.pvxplus.com/mnemonics/picture)**

## Example

```
begin ;
open (12)"*bitmap*";
print 'CS',
print (12)'rectangle'(@x(1),@y(1),@x(10),@y(5)),
print (12)'text'(@x(12),@y(2),"Howdy"),
print 'picture'(@x(40),@y(0),@x(79),@y(24),"#12",0),
```
