LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

From BMP to pixel

Hello ,

I'm using CVI 7.0
I have this problem, i generate a bmp file to another team that AUTOCAD and CATIA V5.
They can open a BMP file with autocad, but when they open the AUTOCAD file with
CATIA, they can not see the BMP file generated by CVI.

They ask if it is possible to save a new file in pixel and not in BMP ?

There is a possibility to save image in pixel with CVI ?


Thank you for you Help.

Best Regards.

0 Kudos
Message 1 of 5
(3,597 Views)

Perhaps you need to clarify the concept of "saving by pixel"... BMP format is basically a store-by-pixel format: it stores on disk an array of pixel colors of the image, with some padding if necessary to fill bytes depending on the color depth you choose. So: which is the exact output format you are expecting? In what it differs from standard bmp format?

One question more: it seems that you can open the cvi-generated bmp file with autocad: do you see the correct image this way? If so, the problem seems related more to autocad-catia relation than to cvi...



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,588 Views)
Hello,

Thank you Roberto for your answer, so after discussion with my collegue, they need "WMF" format.

Is  it possible to generate directly this format with CVI ?

Thanks in advance.

Regards.
0 Kudos
Message 3 of 5
(3,559 Views)

Hello,

From a bitmap in CVI, you can only get three types of files: bmp, jpeg and png. I'm afraid there is no way to directly ouput a WMF file Smiley Sad

0 Kudos
Message 4 of 5
(3,553 Views)

Actually it seems that WMF format is not so popular over there: neither Paint nor Photo Editor that comes with MS office can produce a file in this format (it seems that MS does not encourage the use if "his" special image format! Smiley Surprised).

From a quick search in internet, I found some library for reading a wmf file and saving it in other formats, none for writing a file in such standard. It is possible that some specialized graphic programs like PhotoShop can write in WMF (I don't use it so I don't know) but the problem is that WMF and bitmaps are conceptually different standards.

While BMP is a simple array of pixel colors, WMF is a vector standard, i.e. inside that image some elements are trated as separate entities (boxes, circles, lines...) and I suppose this is the reason why your collegues want to go to this format. But I don't know how it can be possible to extrapolate those elements starting from a bitmap image...

It seems to me that the Windows Metafile Resource Center is a rich deposit of informations about this standard: maybe there you can find some better informations than I give.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(3,548 Views)