From 28ea8f0f6229ece74ec288a0e1fb365b9a919133 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Dec 2025 08:19:06 +0000 Subject: [PATCH 1/3] Initial plan From 208574a8f01e274cd260aafd937bab5d2d22912c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Dec 2025 08:24:46 +0000 Subject: [PATCH 2/3] Add PolarPixellate and MosaicBlur filters to parser Co-authored-by: LeeGoDamn <243561453+LeeGoDamn@users.noreply.github.com> --- .../jni/cge/filters/cgeDataParsingEngine.cpp | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/library/src/main/jni/cge/filters/cgeDataParsingEngine.cpp b/library/src/main/jni/cge/filters/cgeDataParsingEngine.cpp index 18b18e61..ba17395b 100644 --- a/library/src/main/jni/cge/filters/cgeDataParsingEngine.cpp +++ b/library/src/main/jni/cge/filters/cgeDataParsingEngine.cpp @@ -1143,6 +1143,33 @@ CGEImageFilterInterface* CGEDataParsingEngine::advancedStyleParser(const char* p { ADJUSTHELP_COMMON_FUNC(pstr, CGEPolkaDotFilter, setDotScaling); } + else if (strcmp(buffer, "polarpixellate") == 0) + { + float centerX, centerY, pixelSizeX, pixelSizeY; + int argNum = sscanf(pstr, "%f%*c%f%*c%f%*c%f", ¢erX, ¢erY, &pixelSizeX, &pixelSizeY); + + if (argNum != 2 && argNum != 4) + { + LOG_ERROR_PARAM(pstr); + return nullptr; + } + + auto* filter = createPolarPixellateFilter(); + + if (filter != nullptr) + { + proc = filter; + if (argNum == 4) + { + filter->setCenter(centerX, centerY); + filter->setPixelSize(pixelSizeX, pixelSizeY); + } + else // argNum == 2, use as pixelSize only + { + filter->setPixelSize(centerX, centerY); + } + } + } else if (strcmp(buffer, "sketch") == 0) { ADJUSTHELP_COMMON_FUNC(pstr, CGESketchFilter, setIntensity); @@ -1336,6 +1363,23 @@ CGEImageFilterInterface* CGEDataParsingEngine::blurParser(const char* pstr, CGEM } } } + else if (strcmp(buffer, "mosaic") == 0) + { + float blurPixels; + if (sscanf(pstr, "%f", &blurPixels) != 1) + { + LOG_ERROR_PARAM(pstr); + return nullptr; + } + + auto* filter = createMosaicBlurFilter(); + + if (filter != nullptr) + { + proc = filter; + filter->setBlurPixels(blurPixels); + } + } else { From 1c246b306da91cc3e0ee39338a1b06b622dd0ddc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Dec 2025 08:25:23 +0000 Subject: [PATCH 3/3] Update README with filter rule string examples for new filters Co-authored-by: LeeGoDamn <243561453+LeeGoDamn@users.noreply.github.com> --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 4ed9db89..cdf45337 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,22 @@ En: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(E Ch: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(ZH)](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-(ZH) "http://wysaid.org") +#### Common Filter Examples + +**Blur Filters:** +- Mosaic Blur: `@blur mosaic ` + - Example: `@blur mosaic 10.0` (blurPixels >= 1.0, default is 1.0 for origin) + +**Style Filters:** +- Polar Pixellate: `@style polarpixellate ,` or `@style polarpixellate ,,,` + - Example: `@style polarpixellate 0.05,0.05` (pixel size only, uses default center 0.5,0.5) + - Example: `@style polarpixellate 0.5,0.5,0.05,0.05` (custom center and pixel size) + - Center range: [0, 1], Pixel size range: [0, 0.2] + +**Dynamic Filters:** +- Motion Flow: `@dynamic mf ,` + - Example: `@dynamic mf 10,0` (10 frames with no delay) + ## Tool Some utils are available for creating filters: [https://github.com/wysaid/cge-tools](https://github.com/wysaid/cge-tools "http://wysaid.org")