Re: Gdi+ Bitmap/Image Clone() function
- From: "GT" <tihenea@xxxxxxxxxxx>
- Date: Thu, 3 Jul 2008 19:46:23 -0400
It looks that is doing it! Probably the Clone function does not do a 'deep'
copy unless?!
George.
"Mark Salsbery [MVP]" <MarkSalsbery[MVP]@newsgroup.nospam> wrote in message
news:2F390916-1170-47D9-8C33-9BA4DE06299F@xxxxxxxxxxxxxxxx
Even a clone holds the original file open?
// my clone test code
void CMFCTesterDlg::OnOK()
{
static Bitmap *bmclone = NULL;
if (bmclone)
{
delete bmclone;
bmclone = NULL;
}
else
{
Bitmap *bm = Bitmap::FromFile(L"e:\\test - Copy.bmp");
bmclone = bm->Clone(0, 0, bm->GetWidth(), bm->GetHeight(),
bm->GetPixelFormat());
delete bm;
Graphics gr(*this);
gr.DrawImage(bmclone, 0, 0, bmclone->GetWidth(), bmclone->GetHeight());
}
}
hmm - I'm going to ask around about this...
Thanks again,
Mark
--
Mark Salsbery
Microsoft MVP - Visual C++
.
- References:
- Re: Gdi+ Bitmap/Image Clone() function
- From: GT
- Re: Gdi+ Bitmap/Image Clone() function
- From: Mark Salsbery [MVP]
- Re: Gdi+ Bitmap/Image Clone() function
- From: GT
- Re: Gdi+ Bitmap/Image Clone() function
- From: Mark Salsbery [MVP]
- Re: Gdi+ Bitmap/Image Clone() function
- From: GT
- Re: Gdi+ Bitmap/Image Clone() function
- From: Mark Salsbery [MVP]
- Re: Gdi+ Bitmap/Image Clone() function
- Prev by Date: Re: Gdi+ Bitmap/Image Clone() function
- Next by Date: switching between offscreen and onscreen drawing
- Previous by thread: Re: Gdi+ Bitmap/Image Clone() function
- Next by thread: Re: Gdi+ Bitmap/Image Clone() function
- Index(es):
Loading