Skip to main content

MimRearrange

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Copies specified areas of a source buffer to the specified areas of a destination buffer.

Syntax

void MimRearrange(
AIL_ID RearrangeContextImId, //in
AIL_ID SrcImageBufId, //in
AIL_ID DstImageBufId, //out
AIL_INT64 ControlFlag //in
)

Description

This function copies specified areas of a source buffer to specified areas of a destination buffer. The rest of the source image buffer is ignored and not copied.

Before using this function, you must configure the specified image processing context with which operation to perform, using MimControl with M_MODE. This specifies whether to copy rectangular areas or rows of the source buffer. In addition, you must specify the offsets and sizes of the source and destination areas, using MimPut with M_XY_SOURCE, M_XY_DESTINATION, and M_XY_SIZE. Note that each array in the rearrangement image processing context must have the same number of elements. The source and destination image buffers need not be of the same size, but must be equal to or larger than the largest supplied source and destination coordinates.

Once the rearrangement image processing context is configured, preprocess the context by calling MimRearrange with M_PREPROCESS. If the preprocess operation is not done explicitly (using M_PREPROCESS), it will be done when MimRearrange is first called. When preprocessing explicitly, the source and destination image buffers can be set to M_NULL. If, however, the source or destination image buffer is provided, it will be used in the preprocess operation, to better optimize future calls.

Parameters

RearrangeContextImId (in, AIL_ID)

Specifies the identifier of the rearrangement image processing context that indicates how to perform the operation and the locations to copy. This context should be previously allocated using MimAlloc with M_REARRANGE_CONTEXT.

SrcImageBufId (in, AIL_ID)

Specifies the identifier of the source image buffer.

DstImageBufId (out, AIL_ID)

Specifies the identifier of the destination image buffer.

ControlFlag (in, AIL_INT64)

Specifies the operation to perform. This parameter must be set to one of the following values.

For specifying the operation to perform

ValueDescription
M_DEFAULTPerforms the rearrangement operation.
M_PREPROCESSPreprocesses the specified image processing context. Note that, if not called explicitly, this operation will be performed automatically upon the first call to MimRearrange.

If the identifier of the source and/or destination image buffer is not set to M_NULL, information about the source and/or destination image buffer will be used in the preprocessing operation. |

Copyright © 2026 Zebra Technologies.