LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving an image to file

I'm sorry if the question is trivial, but, although I'm not new to programming, I'm new to both LabWindows/CVI and C.
I wrote an application that handle "text images", i.e. imges stored as ascii text files. In my application these images is stored as matrices of double.
Now I would like to "export" them to some standard format like bmp, jpg, tif, tga. How can I manage to do this? I found some info on reading image files ad handling them using a "bitmap object", but nothing about writing them to disk...

Thanks

Giacomo
0 Kudos
Message 1 of 6
(3,612 Views)
You can semplify you life deconding your picture to a user interface canvas
(CanvasDrawPoint) and then save the "control image" with
SaveCtrlDisplayToFile (programmer Toolbox).

"MadGiac" wrote in message
news:50650000000800000062E60000-1079395200000@exchange.ni.com...
> I'm sorry if the question is trivial, but, although I'm not new to
> programming, I'm new to both LabWindows/CVI and C.
> I wrote an application that handle "text images", i.e. imges stored as
> ascii text files. In my application these images is stored as matrices
> of double.
> Now I would like to "export" them to some standard format like bmp,
> jpg, tif, tga. How can I manage to do this? I found some info on
> reading image files ad handling them using a "bitmap object", but
> noth
ing about writing them to disk...
>
> Thanks
>
> Giacomo
0 Kudos
Message 2 of 6
(3,612 Views)
Thaks a lot, your suggestions have been very helpfull! Problem solved...

Giacomo
0 Kudos
Message 3 of 6
(3,612 Views)
> You can semplify you life deconding your picture to a user interface canvas
> (CanvasDrawPoint) and then save the "control image" with
> SaveCtrlDisplayToFile (programmer Toolbox).

Or convert your array to RGB and save it as JPEG or PNG with my functions panels:
http://www.gdargaud.net/Hack/LabWindows.html#Png
--
Guillaume Dargaud
http://www.gdargaud.net/
"A good catchword can obscure analysis for fifty years." ? Wendell L. Willkie.
0 Kudos
Message 4 of 6
(3,612 Views)
Oh Guillaume,

your jpeg/png fp are very very usefull. I'm discovered your site same time
ago. Happy to see you here. 😉

Maybe you can implement a jpeg compression of a memory buffer in another
memory buffer instead of a file. This could be usefull for some triks 😉

Bye !

Marco Turra


"Guillaume Dargaud" wrote in message
news:410981fa@newsgroups....
> > You can semplify you life deconding your picture to a user interface
canvas
> > (CanvasDrawPoint) and then save the "control image" with
> > SaveCtrlDisplayToFile (programmer Toolbox).
>
> Or convert your array to RGB and save it as JPEG or PNG with my functions
panels:
> http://www.gdargaud.net/Hack/LabWindows.html#Png
> --
> Guillaume Dargaud
> http://www.gdargaud.
net/
> "A good catchword can obscure analysis for fifty years." � Wendell L.
Willkie.
>
0 Kudos
Message 5 of 6
(3,612 Views)
I already solved my problem following Marco's suggestions,but your fp seems to be very interesting! The may turn useful in the future...

Thaks

Giacomo
0 Kudos
Message 6 of 6
(3,612 Views)