LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save a picture(.bmp or .jpg) to database(Access or SQL Server)

The version of CVI I am using is 6.0.
First,How to read a picture as binary data by using CVI?
Then , how to save it to the database(Access or SQL Server)?
Your quick reply is appreciated.
 
Thanks!
 
Vicent
0 Kudos
Message 1 of 3
(3,860 Views)

With regards to BMP files, you can accomplish the first task of yours by using GetBitmapFromFile () and GetBitmapData () functions: the Bits parameter of the last one is the array of binary data that represents the image.

With regards to JPG files, there is no native support of this type of files;  I have successfully used in the past an instrument developed by Guillaume Dargaud and available on his website to manipulate jpeg files: his Jpg_ReadBitmapFromFile () function returns the same bits array of your image.



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?
Message 2 of 3
(3,858 Views)
Roberto Bozzolo,thanks for your help!
0 Kudos
Message 3 of 3
(3,848 Views)