Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I save the OLE Picture returned from CWGraph.ControlImage as a jpg?

CWGraph.ControlImage returns a pictureBox.picture object but I have not been able to save this picture as a jpg. I am using Intel's ijl11.dll and plan to save the jpg via their suggestion:
Dim c As New cDibSection
' Convert Picture object to DIBSection:
c.CreateFromPicture picThis.Picture
' Save it:
SaveJPG c, sFileName

I find that the picture returned from ControImage is incompatible with the 'standard' picture.
Help!!!
0 Kudos
Message 1 of 2
(5,954 Views)
Hello

The CWGraph ControlImage method returns an enhanced Windows metafile format .

SavePicture CWGraph.ControlImage, "C:\myImage.emf"

You can use VB's SavePicture method to save it as a window's metafile image, but if you need to convert it into a jpeg, you will need some third party tools, since VB 6.0 does not have any libraries for such file format conversions. VB.NET though has a bunch of class libraries for such conversions though.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(5,954 Views)