O'Reilly logo

DarkBASIC Pro Game Programming, Second Edition by Joshua R. Smith, Jonathan S. Harbour

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The BitmapInfo Program

The BitmapInfo program (which is located on the CD-ROM under \sources\chapter09\BitmapInfo) loads a bitmap file and then displays the width, height, and depth of the bitmap. Figure 9.5 shows the output of the program.

Figure 9.5. The BitmapInfo program demonstrates how to read the width, height, and color depth of a bitmap.

' load the bitmap file LOAD BITMAP "earth.bmp", 1 ' display the bitmap file COPY BITMAP 1, 0 ' display information about the bitmap SET CURRENT BITMAP 0 TEXT 460, 0, "WIDTH: " + STR$(BITMAP WIDTH(1)) TEXT 460, 20, "HEIGHT: " + STR$(BITMAP HEIGHT(1)) TEXT 460, 40, "COLOR DEPTH: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required