LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of GetBitmapInfo()

I want to process .pcx format image file ,I'd like to know if I can use GetBitmapInfo() to detect a .pcx data ? If it can not ,what accessorial method can be used ? Thanks.

David
0 Kudos
Message 1 of 7
(3,728 Views)
I'm not sure what you mean by detecting pcx data, but if you call GetBitmapFromFile with your .pcx file as an input, you can then call GetBitmapInfo on the resulting CVI bitmap. By then, the data is no longer specific to the PCX specification, but it's generic bitmap data, in a device independent format.

Luis Gomes
NI
0 Kudos
Message 2 of 7
(3,728 Views)
Luis,

I want to extract the .pcx format binary data and save it into my database . Then , if it is needed , I can retrieve the data and display it in the secreen . Which function can be used ? Thansk .

David
0 Kudos
Message 3 of 7
(3,728 Views)
First, call GetBitmapFromFile. Once you have a bitmap id, the GetBitmapData function will give you the internal bitmap data. You can store this data in your database, and when you're ready to display it, just call NewBitmap and pass this data as input.

- luis
0 Kudos
Message 4 of 7
(3,728 Views)
First, call GetBitmapFromFile. Once you have a bitmap id, the GetBitmapData function will give you the internal bitmap data. You can store this data in your database, and when you're ready to display it, just call NewBitmap and pass this data as input.

- luis
0 Kudos
Message 5 of 7
(3,728 Views)
If the original image is in .pcx format , I'd like to know if the stored data can also keep its property without beeing changed into .bmp format ?

David
0 Kudos
Message 6 of 7
(3,728 Views)
I'm not sure what you mean by "its property" but once you load the image into a CVI bitmap, it's no longer a pcx image, nor is it a bmp image. It's an in-memory CVI bitmap, with its own format.

If you need to keep the data in pcx format for some reason, then you should just read the contents of the file directly into your database and then whenever you need to use it, you can dump the data into a temporary file and then call GetBitmapFromFile

- luis
0 Kudos
Message 7 of 7
(3,728 Views)