1 #ifndef DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
2 #define DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include "pixel-buffer-impl.h"
32 * Perform a one dimension Gaussian blur convolution and write its output buffer transposed.
34 * @param[in] inBuffer The input buffer with the source image
35 * @param[in] outBuffer The output buffer with the Gaussian blur applied and transposed
36 * @param[in] bufferWidth The width of the buffer
37 * @param[in] bufferHeight The height of the buffer
38 * @param[in] blurRadius The radius for Gaussian blur
40 void ConvoluteAndTranspose( unsigned char* inBuffer, unsigned char* outBuffer, const unsigned int bufferWidth, const unsigned int bufferHeight, const float blurRadius );
43 * Perform Gaussian blur on a buffer.
45 * A Gaussian blur is generated by replacing each pixel’s color values with the average of the surrounding pixels’
46 * colors. This region is a circle with the given radius. Thus, a bigger radius yields a blurrier image.
48 * @note The pixel format of the buffer must be RGBA8888
50 * @param[in] buffer The buffer to apply the Gaussian blur to
51 * @param[in] blurRadius The radius for Gaussian blur
53 void PerformGaussianBlurRGBA( PixelBuffer& buffer, const float blurRadius );
57 } //namespace Internal
61 #endif // DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H