From: Sonu on 26 Jul 2006 14:37 Hello all, I am working in VC++ 2005 I need to draw somethig and save it as a jpeg, without showing it on the screen. So in other words, I need to draw on a DC and save the contents of the DC as a jpeg. How do I do this? The CImage class? But how do I exactly do this particular thing with it? Thanks Srishti
From: AliR on 26 Jul 2006 15:45 You can use CImage to that. AliR. "Sonu" <sonu(a)online.nospam> wrote in message news:EBEFD795-41E3-40AF-8450-FDA03A57720E(a)microsoft.com... > Hello all, > I am working in VC++ 2005 > I need to draw somethig and save it as a jpeg, without showing it on the > screen. > So in other words, I need to draw on a DC and save the contents of the DC as > a jpeg. How do I do this? The CImage class? But how do I exactly do this > particular thing with it? > Thanks > Srishti
From: Sonu on 26 Jul 2006 17:21 Exactly how?? Can you help please? "AliR" wrote: > You can use CImage to that. > > AliR. > > "Sonu" <sonu(a)online.nospam> wrote in message > news:EBEFD795-41E3-40AF-8450-FDA03A57720E(a)microsoft.com... > > Hello all, > > I am working in VC++ 2005 > > I need to draw somethig and save it as a jpeg, without showing it on the > > screen. > > So in other words, I need to draw on a DC and save the contents of the DC > as > > a jpeg. How do I do this? The CImage class? But how do I exactly do this > > particular thing with it? > > Thanks > > Srishti > > >
From: AliR on 26 Jul 2006 17:54 CImage Image; Image.Create(...); CDC *pDC = CDC::FromHandle(Image.GetDC()); pDC->MoveTo(....); pDC->LineTo(...); Image.ReleaseDC(); Image.Save(....); AliR. "Sonu" <sonu(a)online.nospam> wrote in message news:D5187575-EBCC-466C-B435-7F4E60A946B4(a)microsoft.com... > Exactly how?? Can you help please? > > > "AliR" wrote: > > > You can use CImage to that. > > > > AliR. > > > > "Sonu" <sonu(a)online.nospam> wrote in message > > news:EBEFD795-41E3-40AF-8450-FDA03A57720E(a)microsoft.com... > > > Hello all, > > > I am working in VC++ 2005 > > > I need to draw somethig and save it as a jpeg, without showing it on the > > > screen. > > > So in other words, I need to draw on a DC and save the contents of the DC > > as > > > a jpeg. How do I do this? The CImage class? But how do I exactly do this > > > particular thing with it? > > > Thanks > > > Srishti > > > > > >
From: Sonu on 26 Jul 2006 18:31 Thanks a lot... That worked perfectly fine!!! I was trying something similar, but I thing I was getting stuck on the line Image.Save(_T("myImage.jpg", ImageFormatJPEG ); the compiler says that ImageFormatJPEG is an undeclared identifier!! But it savs it as jpeg if I don't mention a second parameter! What is wrong with "ImageFormatJPEG" Thanks you soooo much Srishti "AliR" wrote: > CImage Image; > Image.Create(...); > > CDC *pDC = CDC::FromHandle(Image.GetDC()); > > pDC->MoveTo(....); > pDC->LineTo(...); > > Image.ReleaseDC(); > > Image.Save(....); > > AliR. > > > "Sonu" <sonu(a)online.nospam> wrote in message > news:D5187575-EBCC-466C-B435-7F4E60A946B4(a)microsoft.com... > > Exactly how?? Can you help please? > > > > > > "AliR" wrote: > > > > > You can use CImage to that. > > > > > > AliR. > > > > > > "Sonu" <sonu(a)online.nospam> wrote in message > > > news:EBEFD795-41E3-40AF-8450-FDA03A57720E(a)microsoft.com... > > > > Hello all, > > > > I am working in VC++ 2005 > > > > I need to draw somethig and save it as a jpeg, without showing it on > the > > > > screen. > > > > So in other words, I need to draw on a DC and save the contents of the > DC > > > as > > > > a jpeg. How do I do this? The CImage class? But how do I exactly do > this > > > > particular thing with it? > > > > Thanks > > > > Srishti > > > > > > > > > > > >
|
Next
|
Last
Pages: 1 2 Prev: CException difference in VS2005 Next: Trying to handle events from HTMLElementEvents... |