Hi!!!
I have this code:
vb Code:
Dim TGA As New TGAReader(Open.FileName) Dim imagedata() As Byte = TGA.GetImageData(TGA.FileBytes) Pic.Image = New Bitmap(TGA.ImageWidth, TGA.ImageHeight, TGA.ImageStride, Imaging.PixelFormat.Format24bppRgb, 'The pointer here)
The TGAReader class is a class made by me that reads a TGA file. As suggested the Method GetImageData retrieves a array of type byte.
This array contains three bytes for each pixel (The RGB intensities), thats why the pixelformat is 24bppRgb.
Now i want to create a pointer to that array of bytes. But i just dont know how. I know that a pointer can "be created" throw the IntPtr class. But I dont have any value to pass to the constructer. Can you help me??




Reply With Quote