EDN Admin
Well-known member
I am trying to save a CBitMap into a file. It was recommended that I use CImage to do so. But I cant get the code to compile<br/> I am trying to do something like this:<br/>
<p style="margin:0px;font-family:courier new <span style="color:blue <br/>
<p style="margin:0px;font-family:courier new <span style="color:blue #include <span style="color:maroon <atlimage.h>
<p style="margin:0px;font-family:courier new <span style="color:blue #include <span style="color:maroon <Gdiplusimaging.h>
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new CBitmap bitmap;
<p style="margin:0px;font-family:courier new bitmap.CreateBitmap(width, height, 1, 32, rgbData);
<p style="margin:0px;font-family:courier new CImage image;
<p style="margin:0px;font-family:courier new image.Attach(bitmap);
<p style="margin:0px;font-family:courier new image.Save(_T(<span style="color:maroon "C:\test.bmp" ), Gdiplus::ImageFormatBMP);
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new but it couldnt be compliled.
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new What do I have to do?
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new So if I cant use CImage, is there an equivalent class to use that is supported by C++ 6.0 version?
<p style="margin:0px;font-family:courier new
View the full article
<p style="margin:0px;font-family:courier new <span style="color:blue <br/>
<p style="margin:0px;font-family:courier new <span style="color:blue #include <span style="color:maroon <atlimage.h>
<p style="margin:0px;font-family:courier new <span style="color:blue #include <span style="color:maroon <Gdiplusimaging.h>
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new CBitmap bitmap;
<p style="margin:0px;font-family:courier new bitmap.CreateBitmap(width, height, 1, 32, rgbData);
<p style="margin:0px;font-family:courier new CImage image;
<p style="margin:0px;font-family:courier new image.Attach(bitmap);
<p style="margin:0px;font-family:courier new image.Save(_T(<span style="color:maroon "C:\test.bmp" ), Gdiplus::ImageFormatBMP);
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new but it couldnt be compliled.
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new What do I have to do?
<p style="margin:0px;font-family:courier new
<p style="margin:0px;font-family:courier new So if I cant use CImage, is there an equivalent class to use that is supported by C++ 6.0 version?
<p style="margin:0px;font-family:courier new
View the full article