Click or drag to resize

IMcImagesAddFromMemory Method

Allows access to user-created image buffers.

Namespace:  MediaCy.IQL.Engine
Assembly:  MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
Syntax
VB
Function AddFromMemory ( 
	Name As String,
	Width As Integer,
	Height As Integer,
	FrameCount As Integer,
	Type As Object,
	Flags As Integer,
	pImageMemory As IntPtr
) As McImage

Parameters

Name
Type: SystemString
The name given to both the McImage.Name and McImage.DisplayName properties. The Name property is changed to make it "parseable" and to avoid collisions with other users of the name. If an empty name is supplied, the Name is "untitled0". See McImage.Name for more details.
Width
Type: SystemInt32
Width of each image frame, in pixels.
Height
Type: SystemInt32
Height of each frame, in pixels.
FrameCount
Type: SystemInt32
Number of frames to initially allocate. Default 1, must be 1 or more. If more than 1, all frames are contiguous (share the same memory).
Type
Type: SystemObject
This can be an instance of an IMcImageType interface or it can be a numeric "QuickType" (See mcImageQuickTypes).
Flags
Type: SystemInt32
See mcImageCreateFlags for the list of supported flags. The mcicfNoInit and mcicfContiguous flags are ignored.
pImageMemory
Type: SystemIntPtr
A Long value that is actually an in-process pointer to a block of memory large enough to hold the specified number of frames at the given Width and Height with pixels sized and laid out as specified by the Type. No check is made on this other than the total size is limited to 768 MB.

Return Value

Type: McImage
The new McImage.
Remarks
This method is mostly intended for Capture drivers that allocate thier own image buffers. But you might also want to use this method from low-level code to, for example, treat a DIB read from a file as an image.
See Also