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... | |
| template<template< class > class A, template< class > class B> | |
| SIMD_INLINE void | Copy (const View< A > &src, View< B > &dst) |
| Copies pixel data row by row from a source image to a destination image. More... | |
| template<template< class > class A> | |
| SIMD_INLINE void | CopyFrame (const View< A > &src, const Rectangle< ptrdiff_t > &frame, View< A > &dst) |
| Copies the outer frame region of a source image to the destination image, leaving the interior rectangle untouched. 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).
◆ Copy()
Copies pixel data row by row from a source image to a destination image.
Supports any pixel format. The source and destination images must have the same width, height, and format (and therefore the same pixel size), but may have different row strides (e.g. due to row alignment padding). If the source image format is View::None, the function does nothing.
- Note
- This function is a C++ wrapper for function SimdCopy.
- Parameters
-
[in] src - a source image. [out] dst - a destination image.
◆ CopyFrame()
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 format. The function copies four areas by calling Simd::Copy for the corresponding image regions: rows above frame.top, rows at or below frame.bottom, columns before frame.left inside the frame vertical range, and columns at or after frame.right inside the frame vertical range. The rectangle [frame.left, frame.right) x [frame.top, frame.bottom) is left unchanged. Frame coordinates must satisfy 0 <= frame.left <= frame.right <= src.width and 0 <= frame.top <= frame.bottom <= src.height.
- Note
- This function is implemented on the base of function Simd::Copy.
- Parameters
-
[in] src - a source image. [in] frame - a rectangle defining the untouched interior region. [out] dst - a destination image.