MbufCopyMask()函数

Synopsis

Copy buffer with mask.

Format

void MbufCopyMask(SrcBufId, DestBufId, MaskValue)

MIL_ID SrcBufId; Source buffer identifier
MIL_ID DestBufId; Destination buffer identifier
long MaskValue; Mask value to apply to the destination buffer

Description

This function copies the specified source buffer data to the specified destination buffer, modifying only the bits of the destination that have a non-zero corresponding bit in the mask.

The SrcBufId and DestBufId parameters specify the identifiers of the source and destination data buffers.

The MaskValue parameter specifies the mask value. Even though this value is of type ‘long’, it is treated as if it had the same depth as the destination buffer; the most-significant bits that are not required are ignored. If the destination buffer is binary, the value must be 0 or 1.

If the source buffer depth is greater than that of the destination, the most significant bits are truncated when the data is copied to the destination. If the destination depth is greater than that of the source, the source data is zero or sign-extended (depending on the type of the source) when copied to the destination.

Status

Not available on floating-point buffers.

See also

MbufCopy, MbufCopyClip, MbufCopyCond

《MbufCopyMask()函数》上有2条评论

评论已关闭。