Conversion functions, Convert, and ConvertDirect, take two alignment parameters, one for the input buffer, and one for the output buffer.
Non-zero values for these parameters indicate that the input and output buffer's scanlines (rows of pixels) are padded with extra non-image bytes so that the total number of bytes in each scanline is a multiple of nInAlign (input buffer) or nOutAlign (output buffer).
For example, consider having a 3 column x 1 row CMY image buffer (9 bytes total) to be converted to RGB:
If the input buffer is not aligned and you need the output buffer to be aligned by 4 bytes (a memory need), call Convert or ConvertDirect with:
C0 | M0 | Y0 | C1 | M1 | Y1 | C2 | M2 | Y2 |
(a) Input
R0 | G0 | B0 | R1 | G1 | B1 | R2 | G2 | B2 |
(b) Output
If the above 3 column x 1 row CMY input buffer is 4-bytes aligned (12 bytes total), and the output buffer is not to be aligned call Convert or ConvertDirect with:
C0 | M0 | Y0 | C1 | M1 | Y1 | C2 | M2 | Y2 |
(a) Input
R0 | G0 | B0 | R1 | G1 | B1 | R2 | G2 | B2 |
(b) Output
If the above 3 column x 1 row CMY input buffer is 4-bytes aligned (12 bytes total), and the output buffer needs to be 4-bytes aligned, call Convert or ConvertDirect with:
C0 | M0 | Y0 | C1 | M1 | Y1 | C2 | M2 | Y2 |
(a) Input
R0 | G0 | B0 | R1 | G1 | B1 | R2 | G2 | B2 |
(b) Output
Any other combination may be used for any supported color conversions. In any case the user should allocate enough memory for the actual pixels and the additional alignment bytes if any.
Programming With MediaWriter |
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.