Contained in a Byte array named MapArray(1 to 1639478) is a 1280 by 1280 pixel BMP with a 256 color LUT. The contents of this array was not loaded as a BMP file from disc but instead was computed from a proprietary and highly-compressed image file. The content of the array represents a topographic map and it is desired to overlay this map with symbology created by the GRAPHIC set of PB commands
One method for accomplishing this is:
CompositePath = "C:\MAP.BMP"
OPEN CompositePath FOR BINARY ACCESS WRITE AS 1
PUT 1, 1, MapArray()
CLOSE 1
GRAPHIC BITMAP LOAD CompositePath,1280,1280 TO BMPHandle
GRAPHIC ATTACH BMPHandle
GRAPHIC SCALE (0,0)-(1279,1279)
CALL DrawRings
CALL DrawAircraft
CALL DrawFeatures
GRAPHIC SAVE CompositePath
GRAPHIC BITMAP END
Is there some alternate approach which would avoid the need to firstly, save the contents of MapArray to disc as a BMP file via the PUT statement and secondly, reload the BMP file for GRAPHIC operations via the GRAPHIC BITMAP LOAD statement?
Might I somehow establish a BMPHandle for MapArray and directly use GRAPHIC ATTACH BMPHandle to initiate the drawing function?
One method for accomplishing this is:
CompositePath = "C:\MAP.BMP"
OPEN CompositePath FOR BINARY ACCESS WRITE AS 1
PUT 1, 1, MapArray()
CLOSE 1
GRAPHIC BITMAP LOAD CompositePath,1280,1280 TO BMPHandle
GRAPHIC ATTACH BMPHandle
GRAPHIC SCALE (0,0)-(1279,1279)
CALL DrawRings
CALL DrawAircraft
CALL DrawFeatures
GRAPHIC SAVE CompositePath
GRAPHIC BITMAP END
Is there some alternate approach which would avoid the need to firstly, save the contents of MapArray to disc as a BMP file via the PUT statement and secondly, reload the BMP file for GRAPHIC operations via the GRAPHIC BITMAP LOAD statement?
Might I somehow establish a BMPHandle for MapArray and directly use GRAPHIC ATTACH BMPHandle to initiate the drawing function?
Comment