-1
我想以JPEG格式存儲圖像。我正在使用this創建圖表。現在我想保存圖表。函數名稱SaveAsImage()由需要GUID參數的庫提供。JPEG,BMP,PNG的GUID變量
這裏是代碼:
我應該如何初始化jpeg的GUID?
TChartString title = m_ChartSeriesDetail[i].seriesTitle;
m_ChartCtrl.Print(title, 0);
CRect rect;
GUID guid;
m_ChartCtrl.SaveAsImage((TChartString)m_ChartName, rect, 32, guid);
////////////////////////////////////////////////////////////////////// //!
Saves the chart to an image file
/**
This function is not available for VC6 and earlier.
@param strFilename
The name of the file in which to save the image.
@param rect
The size of the image. If an empty rectangle is provided, the
size of the chart on screen will be used (this results in an identical
image as what is seen on the screen).
@param nBPP
The numbers of bits per pixel in the bitmap. Usually 4, 8, 16, 24, or 32.
@param guidFileType
The file type to save the image as. See the CImage::Save in MSDN
for more information.
**/
void SaveAsImage(const TChartString& strFilename, const CRect& rect,
int nBPP, REFGUID guidFileType= GUID_NULL);`
您的問題缺少*問題*。 – WhozCraig
對不起,我應該如何初始化jpeg GUID? –
您是否嘗試「查看CImage :: MSDN中保存以獲取更多信息」?該文件準確告訴你可能的參數是什麼。 – molbdnilo