|
i need covert JPEG to BMP. can you tell specific for CImage. thank very much.
|
|
|
|
|
#include <atlimage.h>
...
CImage img;
img.Load(_T("c:\\some.jpg"));
img.Save(_T("c:\\some.bmp"), ImageFormatBMP);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
this is CImage of .net. i need source = VC++6.0. thank very much
|
|
|
|
|
CImage is a class shared by ATL and MFC these days.
It uses GDI+ for image loading and saving.
Here's the GDI+ version:
#include <gdiplus.h>
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
{
UINT num = 0;
UINT size = 0;
ImageCodecInfo* pImageCodecInfo = NULL;
GetImageEncodersSize(&num, &size);
if(size == 0)
return -1;
pImageCodecInfo = (ImageCodecInfo*)(malloc(size));
if(pImageCodecInfo == NULL)
return -1;
GetImageEncoders(num, size, pImageCodecInfo);
for(UINT j = 0; j < num; ++j)
{
if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )
{
*pClsid = pImageCodecInfo[j].Clsid;
free(pImageCodecInfo);
return j;
}
}
free(pImageCodecInfo);
return -1;
}
...
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);
CLSID bmpClsid;
GetEncoderClsid(L"image/bmp", &bmpClsid);
pSrcBitmap->Save(L"c:\\test.bmp", &bmpClsid);
delete pSrcBitmap;
Gdiplus::GdiplusShutdown(dwToken);
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
can you sent full code to me. wish your help. thanks very much
|
|
|
|
|
You can use of CImage class with Save function of it.
|
|
|
|
|
Hi to all,
I need to convert an array of bitmap to a compress format (avi, mpeg4 and so on). Do you have any idea how to do it in C++???
Regards,
Daniele
|
|
|
|
|
Do you want to make a video files?
|
|
|
|
|
How i can change the policies programatically? I tried it with LSA functions... but i am not getting it yet. I came to know that its stored in files... but nothing works.... Please help me out...
Thanks in advance.
|
|
|
|
|
In ABC triangle, there are A and B coordinates are given, AB, AC and BC distances are known, the ACB angle is 90'. How to find C point x,y coordinates?
chesnokov
|
|
|
|
|
Stolen membership?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Not stolen membership. It's him and he's been asking extremely basic questions for quite a while now: Unresolved external symbol[^].
It's funny how he asked if we earn money with votes and started whining after someone voted down his article. I've (along with a few other regulars) stopped providing any assistance to him.
And now he has posted a trigonometry question in the Visual C++ board.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: And now he has posted a trigonometry question in the Visual C++ board.
With requirements' redundance...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Unbelievable [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
More things[^] He deleted all his rude posts!
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
I never saw Mark so upset
Now I'm curious about deleted messages content.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
No, Mark was not upset. That is the dialogues from Monty Python holy grail scene 8.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
OK but there should be a reason to quote it, shouldn't it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
When I asked him not to low-vote all the posts, he said that we must look at things the "Monty Python" way. So, Mark replied with a Monty python quote.
He asked me if I earn money with votes and said that I am partial towards high votes. Later on, ironically he started squealing and crying after someone voted his article down. Talk about the people who won't follow their own suggestions. 
|
|
|
|
|
I think he is a CodeGuru 's infiltrator whoose purpose is defaming CodeProject MVP s' honor
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Does your triangle look like:
A
|\
| \
| \
| \
| \
| \
| \
C -------- B
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Well, I suppose you may freely rotate it and (as long as you keep the straight angle) make it isosceles.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
My question was actually leading up to something else. If he knows the x,y coordinates of A and B, and he knows the distance of AC and BC, then he should be able to add/subtract from A and B to get C.
I've never studied trigonometry so I may be missing something obvious.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I was just kidding and your point is good. IMHO the problem with is question is the redundance of inputs (excluding the 'stolen membership hypothesis').
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes exactly. I've got recently extension as we can have either A,B coords and CBA,CAB angles to find out C coords, or we know B coord only plus AB,BC lengths to find out A coords.
I'm ashamed I always exceled in geometry but that was dozen of years ago in school.
chesnokov
|
|
|
|