Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DimplePanchal

macrumors newbie
Original poster
Jun 3, 2011
1
0
Ahmedabad
Code:
System::Drawing::Graphics^ grp = System::Drawing::Graphics::FromImage(bmpDest);
			System::Drawing::Bitmap^ bmp = gcnew 
				System::Drawing::Bitmap(Width, Height, grp);
			System::Drawing::Imaging::BitmapData^ bmpData = bmp->LockBits(
				System::Drawing::Rectangle(0, 0, Width, Height),
				System::Drawing::Imaging::ImageLockMode::ReadWrite,
				System::Drawing::Imaging::PixelFormat::Format24bppRgb);
			System::Diagnostics::Debug::Assert(bmpData->Stride == ScanWidth);
			memcpy((char*)(void*)bmpData->Scan0, Data, bmpData->Stride*bmpData->Height);
			bmp->UnlockBits(bmpData);

I am trying to convert this code in iphone. But I am having one confusion. Is this code creating entire image or is just replacing an array of pixels...???
 
In the C language, the memcpy function copies bytes from one memory space to another. The gcnew statement makes me suspect that a new buffer is being created for those copied bytes.

You haven't posted much code, but I also suspect that bmpDest and Data are somehow related.

I'm not familiar with the :: syntax. What language is this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.