Functions for image copying. More...
Functions | |
| SIMD_API void | SimdCopy (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t pixelSize, uint8_t *dst, size_t dstStride) |
| Copies pixel data row by row from a source image to a destination image. More... | |
| SIMD_API void | SimdCopyFrame (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t pixelSize, size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t *dst, size_t dstStride) |
| Copies the outer frame region of a source image to the destination image, leaving the interior rectangle untouched. More... | |
| template<template< class > class A, template< class > class B> | |
| SIMD_INLINE void | Copy (const View< A > &src, View< B > &dst) |
| Copies pixels data of image from source to destination. More... | |
| template<template< class > class A> | |
| SIMD_INLINE void | CopyFrame (const View< A > &src, const Rectangle< ptrdiff_t > &frame, View< A > &dst) |
| Copies pixels data of image from source to destination except for the portion bounded frame. More... | |
Detailed Description
Functions for image copying.
Function Documentation
◆ SimdCopy()
| void SimdCopy | ( | const uint8_t * | src, |
| size_t | srcStride, | ||
| size_t | width, | ||
| size_t | height, | ||
| size_t | pixelSize, | ||
| uint8_t * | dst, | ||
| size_t | dstStride | ||
| ) |
Copies pixel data row by row from a source image to a destination image.
Supports any pixel format; pixelSize specifies the number of bytes per pixel. The source and destination images must have the same width, height, and pixel size, but may have different row strides (e.g. due to row alignment padding).
- Note
- This function has a C++ wrapper Simd::Copy(const View<A> & src, View<B> & dst).
- Parameters
-
[in] src - a pointer to pixels data of the source image. [in] srcStride - a row size of the src image in bytes (including any padding). [in] width - an image width in pixels. [in] height - an image height in pixels. [in] pixelSize - a size of one pixel in bytes. [out] dst - a pointer to pixels data of the destination image. [in] dstStride - a row size of the dst image in bytes (including any padding).
◆ SimdCopyFrame()
| void SimdCopyFrame | ( | const uint8_t * | src, |
| size_t | srcStride, | ||
| size_t | width, | ||
| size_t | height, | ||
| size_t | pixelSize, | ||
| size_t | frameLeft, | ||
| size_t | frameTop, | ||
| size_t | frameRight, | ||
| size_t | frameBottom, | ||
| uint8_t * | dst, | ||
| size_t | dstStride | ||
| ) |
Copies the outer frame region of a source image to the destination image, leaving the interior rectangle untouched.
The source and destination images must have the same width, height, and pixel size. The frame is defined by the rectangle [frameLeft, frameRight) x [frameTop, frameBottom). Only pixels outside this rectangle (i.e. the surrounding border area) are copied from src to dst. Pixels inside the frame interior are not written to dst.
The following regions are copied:
- All rows above frameTop (full width).
- All rows at or below frameBottom (full width).
- For rows within [frameTop, frameBottom): columns to the left of frameLeft.
- For rows within [frameTop, frameBottom): columns at or to the right of frameRight.
- Note
- This function has a C++ wrapper Simd::CopyFrame(const View<A>& src, const Rectangle<ptrdiff_t> & frame, View<A>& dst).
- Parameters
-
[in] src - a pointer to pixels data of the source image. [in] srcStride - a row size of the src image in bytes (including any padding). [in] width - an image width in pixels. [in] height - an image height in pixels. [in] pixelSize - a size of one pixel in bytes. [in] frameLeft - the left boundary (inclusive) of the interior rectangle in pixels. [in] frameTop - the top boundary (inclusive) of the interior rectangle in pixels. [in] frameRight - the right boundary (exclusive) of the interior rectangle in pixels. [in] frameBottom - the bottom boundary (exclusive) of the interior rectangle in pixels. [out] dst - a pointer to pixels data of the destination image. [in] dstStride - a row size of the dst image in bytes (including any padding).
◆ Copy()
Copies pixels data of image from source to destination.
All images must have the same width, height and format.
- Note
- This function is a C++ wrapper for function SimdCopy.
- Parameters
-
[in] src - a source image. [out] dst - a destination image.
◆ CopyFrame()
Copies pixels data of image from source to destination except for the portion bounded frame.
All images must have the same width, height and format.
- Note
- This function is a C++ wrapper for function SimdCopyFrame.
- Parameters
-
[in] src - a source image. [in] frame - a frame rectangle. [out] dst - a destination image.