Table: | For specifying the function to use in the transfer |
+ combination: | For specifying the scale of M_COPY transfer function |
Table: | For specifying the type of transfer |
+ combination: | For specifying synchronous data transfer |
MIL_ID SrcBufId, | //in |
MIL_ID DestBufId, | //in |
MIL_INT SrcOffX, | //in |
MIL_INT SrcOffY, | //in |
MIL_INT SrcSizeX, | //in |
MIL_INT SrcSizeY, | //in |
MIL_INT SrcBand, | //in |
MIL_INT DestOffX, | //in |
MIL_INT DestOffY, | //in |
MIL_INT DestSizeX, | //in |
MIL_INT DestSizeY, | //in |
MIL_INT DestBand, | //in |
MIL_INT64 TransferFunction, | //in |
MIL_INT64 TransferType, | //in |
MIL_INT64 OperationFlag, | //in |
void *ExtraParameterPtr | //in |
This function copies a two-dimensional region of one or all color bands of the source buffer to a two-dimensional region of one or all bands of the destination buffer, using a specified transfer function and transfer type.
If the size of the regions in the source and destination buffers differ, the size of the largest region is reduced so that the size of the source and destination regions become equal.
Specifies the identifier of the source buffer. When the TransferFunction parameter is set to M_CLEAR, you must set this parameter to M_NULL; when the TransferFunction parameter is set to M_BYTE_SWAP, you can set this parameter to M_NULL to swap bytes within the same buffer.
If the specified buffer is an image buffer with an associated region of interest (ROI), an error will occur.
Floating-point buffers are only supported when the TransferFunction parameter is set to M_COPY.
Specifies the identifier of the destination buffer.
If the specified buffer is an image buffer with an associated region of interest (ROI), an error will occur.
Floating-point buffers are only supported when the TransferFunction parameter is set to M_COPY.
Specifies the horizontal offset of the source region, relative to the top-left coordinate of the source buffer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0 pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the horizontal offset of the source region is ignored when the TransferFunction parameter is set to M_CLEAR. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the horizontal offset of the source region, in pixels. |
Specifies the vertical offset of the source region, relative to the top-left coordinate of the source buffer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0 pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the vertical offset of the source region is ignored when the TransferFunction parameter is set to M_CLEAR. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the vertical offset of the source region, in pixels. |
Specifies the width of the source region.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default width of the source region. The default is equal to the difference between the width of the source buffer and the horizontal offset of the source region. (summarize)Specifies the default width of the source region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the width of the source region is ignored when the TransferFunction parameter is set to M_CLEAR. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the width of the source region, in pixels. |
Specifies the height of the source region.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default height of the source region. The default is equal to the difference between the height of the source buffer and the vertical offset of the source region. (summarize)Specifies the default height of the source region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the height of the source region is ignored when the TransferFunction parameter is set to M_CLEAR. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the height of the source region, in pixels. |
Specifies the color band of the region from which to copy. This parameter can be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_ALL_BANDS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the band of the source region is ignored when the TransferFunction parameter is set to M_CLEAR. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies all color bands (for RGB, HSL, and YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the blue band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the green band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the hue band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the luminance band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the red band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the saturation band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the U band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the V band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the band to copy. The relationship between the index value and band for RGB and HSL buffers is the following:
Specifies the index of the band to copy. (more details...) |
Specifies the horizontal offset of the destination region, relative to the top-left coordinate of the destination buffer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default horizontal offset of the destination region. The default is equal to the horizontal offset of the source region. (summarize)Specifies the default horizontal offset of the destination region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the horizontal offset of the destination region, in pixels. |
Specifies the vertical offset of the destination region, relative to the top-left coordinate of the destination buffer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default vertical offset of the destination region. The default is equal to the vertical offset of the source region. (summarize)Specifies the default vertical offset of the destination region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the value of the vertical offset of the destination region, in pixels. |
Specifies the width of the destination region.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default width of the destination region. The default is equal to the difference between the destination buffer width and the horizontal offset of the destination region. (summarize)Specifies the default width of the destination region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the width of the destination region, in pixels. |
Specifies the height of the destination region.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default height of the destination region. The default is equal to the difference between the destination buffer height and the vertical offset of the destination region. (summarize)Specifies the default height of the destination region. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the height of the destination region, in pixels. |
Specifies the color band of the destination region in which to copy.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_ALL_BANDS. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies all color bands (for RGB, HSL, and YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the blue band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the green band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the hue band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the luminance band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the red band (for RGB buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the saturation band (for HSL buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the U band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the V band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y band (for YUV buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the band in which to copy. The relationship between the index value and band for RGB and HSL buffers is the following:
Specifies the index of the band in which to copy. (more details...) |
Specifies the function to use in the transfer. This parameter can be set to one of the following:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||||
![]() ![]() |
Specifies a transfer function that combines an image with an overlay to create the appearance of partial transparency. The source and destination buffers must both be allocated on-board with a format of M_YUV16 + M_PACKED. When using MbufCreateColor(), the supported overlay buffer formats are M_YUV16 + M_PACKED and M_RGB16 + M_PACKED. Note that overlay buffers are only available when the TransferType parameter is set to M_DRIVER_MODE. (summarize)Specifies a transfer function that combines an image with an overlay to create the appearance of partial transparency. (more details...) |
‡ | h | ||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a transfer function that extracts the bytes in each pixel of the source region, swaps them, and copies the new pixels into the destination region. Note that M_BYTE_SWAP is only supported when the source and destination buffers are both either 1-band 16-bit buffers or 1-band 32-bit buffers and have the same internal storage specifiers. When using 16-bit buffers, the first byte is swapped with the last byte. When using 32-bit buffers, the first byte is swapped with the last byte and the two middle bytes are swapped. You can swap bytes within the same buffer. To do so, set the SrcBufId parameter to M_NULL. (summarize)Specifies a transfer function that extracts the bytes in each pixel of the source region, swaps them, and copies the new pixels into the destination region. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
![]() ![]() |
Specifies a transfer function that clears the destination region. Set all source buffer parameters to M_NULL. (summarize)Specifies a transfer function that clears the destination region. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
![]() ![]() |
Specifies a transfer function that copies all pixels, except for pixels in the source region that are equal to the composition color specified by the OperationFlag parameter. (summarize)Specifies a transfer function that copies all pixels, except for pixels in the source region that are equal to the composition color specified by the OperationFlag parameter. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Note that M_COMPOSITION is only supported with 1-band 8-bit buffers, 1-band 16-bit buffers, M_RGB16 buffers, M_BGR24 buffers, and M_BGR32 buffers. |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | |||||||||||||||||||||
The source and destination buffers must have the same number of bands, the same data-depth per band, and the same storage specifiers, unless the source is a 1-band, 8-bit buffer. In which case, the destination buffer can be a 3-band 8-bit buffer and the source region band is copied into each of the bands of the destination region. If both regions are multi-band, each source band is copied to the corresponding band of the destination. |
‡ | c M10 |
g | h | j | k M10 |
l | m | o | p | r U27 |
t U28 |
v | y U75 |
aa | ||||||||||||||||||||||||
When the TransferType parameter is set to M_DRIVER_MODE, the source and destination buffers must also be allocated with the M_ON_BOARD attribute. The source buffer and destination buffer format is M_YUV16 + M_PACKED. |
‡ | h | |||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a transfer function that copies the data from the source region into the destination region. If the source and destination buffers are of different data types, MIL converts the data automatically. When copying from a floating-point buffer to an integer buffer, the values are truncated. If the source is a 3-band region of a YUV buffer and the destination is a 1-band region, only the Y band (luminance) is copied. If the source is a 3-band region of an RGB buffer and the destination is a 1-band region, only the red band is copied. If both regions are multi-band, each source band is copied to the corresponding band of the destination. Note that when copying from a non-binary buffer to a binary destination buffer, all non-zero pixels in the source buffer are represented as ones (1) in the binary destination buffer. When copying a binary buffer to a buffer of a different depth, each bit is copied into the least-significant bit of a different destination pixel using the specified transfer function. The remaining bits of the destination pixel are set to 0; to propagate the bit value to all bits, use MimBinarize(). (summarize)Specifies a transfer function that copies the data from the source region into the destination region. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
In addition, if the source is a 1-band image buffer associated with a LUT buffer and the destination is 3-band, the source data is first mapped through the LUT before being copied to the destination. |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa |
You can add the following value to the above-mentioned value to set the scale of the M_COPY transfer function.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the data of the source region must be scaled to fit in the destination region. |
Specifies the type of transfer. If M_DEFAULT is not selected, then any combination of the transfer modes listed below can be specified for the TransferType parameter. From this combination of transfer modes, MIL selects the most efficient mode to transfer data. If the most efficient transfer mode fails, then MIL automatically selects the next most efficient transfer mode from the combination of transfer modes. If all selected transfer modes fail, an error is returned. The efficiency of the transfer mode depends on the internal format of the source and destination buffers, as well as the hardware available in your computer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||||
![]() ![]() |
Transfers data using the most efficient transfer mode among the transfer modes listed. |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
![]() ![]() |
[This is
only applicable to Windows]
Transfers data using the DIB interface. Both the source and destination buffers must have the M_DIB attribute. This transfer mode is only possible when the TransferFunction parameter is set to M_COPY. (summarize)[This is
only applicable to Windows]
Transfers data using the DIB interface. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
![]() ![]() |
[This is
only applicable to Windows]
Transfers data using the DirectX interface. Both the source and destination buffers must have the M_DIRECTX attribute. This transfer mode is only possible when the TransferFunction parameter is set to M_CLEAR, M_COMPOSITION, or M_COPY. (summarize)[This is
only applicable to Windows]
Transfers data using the DirectX interface. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
![]() ![]() |
Transfers data using the driver. Note that overlay buffers are only available when the TransferFunction parameter is set to M_ALPHA_BLENDING and the ExtraParameterPtr parameter is set to a MIL buffer identifier. This transfer mode is only possible when the TransferFunction parameter is set to M_ALPHA_BLENDING, M_COMPOSITION, or M_COPY. (summarize)Transfers data using the driver. (more details...) |
‡ | h | ||||||||||||||||||||||||||||||||||||
![]() ![]() |
Transfers data using the standard MIL mode. This transfer mode is always possible. (summarize)Transfers data using the standard MIL mode. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa |
You can add one of the following values to the above-mentioned values to set whether to transfer the data synchronously.
By default, the MbufTransfer() function chooses the value that is the most efficient for data transfer.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the transfer of data is not synchronous. This setting is only possible when the TransferType parameter is equal to M_DIRECTX_MODE. (summarize)Specifies that the transfer of data is not synchronous. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the transfer of data is synchronous. |
Specifies the color value that is passed to the transfer function. If the TransferFunction parameter is set to M_COPY or M_BYTE_SWAP, this parameter must be set to M_NULL.
If the TransferFunction parameter is set to M_CLEAR or M_COMPOSITION, you can set this parameter to one of the following values for a 3-band image buffer:
When dealing with an overlay buffer, this value specifies the overlay transparency value. Supported values are from 0 to 255.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an RGB value. Specify an RGB value when the source buffer is a 3-band buffer. (summarize)Specifies an RGB value. (more details...) |
||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the red component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
Specifies the green component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
Specifies the blue component, as a value between 0 and 255. |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color black. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color bright gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark yellow. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color yellow. |
For a 1-band or 3-band image buffer, you can set this parameter to the following grayscale value:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description |
MIL system-specific tooltip (‡) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||||
![]() ![]() |
Specifies a grayscale value used to clear the 1-band or multi-band buffer. This value is cast to the buffer type and depth. If the destination buffer is 3-band, this value will be replicated in each band. (summarize)Specifies a grayscale value used to clear the 1-band or multi-band buffer. (more details...) |
‡ | a | c M10 |
g | h | i | j | k M10 |
l | m | o | p | r U27 |
t U28 |
u U36 |
v | y U75 |
aa | ||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
Specifies the overlay transparency value. A value of 0 represents 100% of the source buffer and 0% of the overlay buffer. A value of 255 represents 0% of the source buffer and 100% of the overlay buffer. A value of 128 represents 50% of the source buffer and 50% of the overlay buffer. Note that overlay buffers are only available when the TransferFunction parameter is set to M_ALPHA_BLENDING and the TransferType parameter is set to M_DRIVER_MODE. |
‡ | h |
Data type: address of a MIL_ID Note: When using M_ALPHA_BLENDING and M_DRIVER_MODE
Data type: Set this parameter to M_NULL Note: When not using M_ALPHA_BLENDING and M_DRIVER_MODE
Specifies a pointer to the MIL identifier of the overlay buffer, if applicable. Set this parameter to M_NULL in all other cases.
Note that overlay buffers are only available when the TransferFunction parameter is set to M_ALPHA_BLENDING and the TransferType parameter is set to M_DRIVER_MODE.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |