reg., CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG
-
Where we can get CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG in our application ? :confused: Anyone Please help on this. Thanks a Lot:rose:
Thanks a lot
-
Where we can get CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG in our application ? :confused: Anyone Please help on this. Thanks a Lot:rose:
Thanks a lot
The source code is included with Visual Studio. CImage uses GDI+ to load and save images. The loaded GDI+ image is converted to a DIBsection, which is wrapped by the CImage class. The loading code is similar to this (without the conversion to a DIBSection):
ULONG dwToken;
Gdiplus::GdiplusStartupInput input;
Gdiplus::GdiplusStartupOutput output;
Gdiplus::Status status = Gdiplus::GdiplusStartup(&dwToken, &input, &output);
if(status == Gdiplus::Ok)
{
Gdiplus::Bitmap *pSrcBitmap = new Gdiplus::Bitmap(L"C:\\test.jpg", FALSE);//... use the bitmap ...
delete pSrcBitmap;
Gdiplus::GdiplusShutdown(dwToken);
}Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
The source code is included with Visual Studio. CImage uses GDI+ to load and save images. The loaded GDI+ image is converted to a DIBsection, which is wrapped by the CImage class. The loading code is similar to this (without the conversion to a DIBSection):
ULONG dwToken;
Gdiplus::GdiplusStartupInput input;
Gdiplus::GdiplusStartupOutput output;
Gdiplus::Status status = Gdiplus::GdiplusStartup(&dwToken, &input, &output);
if(status == Gdiplus::Ok)
{
Gdiplus::Bitmap *pSrcBitmap = new Gdiplus::Bitmap(L"C:\\test.jpg", FALSE);//... use the bitmap ...
delete pSrcBitmap;
Gdiplus::GdiplusShutdown(dwToken);
}Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
Actually i am sure, there is no manual for CImage, in MS Visual Studio though it is included. If so what header i need to include to proceed? Thanks for your response! :rose:
Thanks a lot
-
Actually i am sure, there is no manual for CImage, in MS Visual Studio though it is included. If so what header i need to include to proceed? Thanks for your response! :rose:
Thanks a lot
atlimage.h in VS 2008 - most of it is inline. It used to be an MFC class so it was a different header file before. What version of Visual Studio are you using? If you don't have a VS version that has the class, you can always use GDI+ directly, as I showed in the sample code. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Where we can get CImage sources (UNICODE COMPATIBLE) to load GIF, JPEG in our application ? :confused: Anyone Please help on this. Thanks a Lot:rose:
Thanks a lot
you can find it on the its header file.