Visual Basic (Declaration) | |
---|---|
Public Sub SetUserData( _ ByVal data As IntPtr, _ ByVal size As Integer _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
Parameters
- data
- Pointer to the unmanaged memory buffer containing the image new data.
- size
- Number of bytes in data.
The data that you specify will not be copied, but instead will be referenced by the image until the image is disposed, or until you call this method again.
To set up a RasterImage object with unmanaged user data, call the _ctor constructor passing RasterMemoryFlags.Userto the flags parameter.
Some image processing commands, such as RotateCommand and ColorResolutionCommand, need to re-allocate the image data. If you create an image with RasterMemoryFlags.User, and pass it to these command, they will change the image to RasterMemoryFlags.Conventional and re-allocate memory. Your original memory will no longer be used.
You are responsible for managing the image data. Dispose will not free data.
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family