Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 21, 2025

PolarPixellate and MosaicBlur filters were implemented in JNI but inaccessible via rule strings. Users had no way to discover or apply these effects through the filter string API.

Changes

Parser additions (cgeDataParsingEngine.cpp):

  • Added polarpixellate to advancedStyleParser:
    • @style polarpixellate <pixelSizeX>,<pixelSizeY> (uses default center 0.5,0.5)
    • @style polarpixellate <centerX>,<centerY>,<pixelSizeX>,<pixelSizeY> (custom center)
  • Added mosaic to blurParser:
    • @blur mosaic <blurPixels> (blurPixels >= 1.0)

Documentation (README.md):

  • Added "Common Filter Examples" section with syntax and parameter ranges
  • Documented MotionFlow (@dynamic mf) for completeness

Usage

// Mosaic blur
String rule = "@blur mosaic 10.0";

// Polar pixellate with default center
String rule = "@style polarpixellate 0.05,0.05";

// Polar pixellate with custom center
String rule = "@style polarpixellate 0.3,0.7,0.08,0.08";

// Combine filters
String rule = "@blur mosaic 10.0 @adjust brightness 0.2";

Bitmap result = CGENativeLibrary.filterImage_MultipleEffects(srcBitmap, rule, 1.0f);
Original prompt

This section details on the original issue you should resolve

<issue_title>Rule string for filters not shown in cge-tools</issue_title>
<issue_description>I can see some filters in jni of the library like PolarPixellate, MosaicBlur, MotionFlow but cge-tool doesn't give any idea to get the rule strings for these filters. How to apply these effects using your library.</issue_description>

<agent_instructions>Fix this issue</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@wysaid They're all supported, I will update the tools later~ @wysaid I see. Motion flow is explained as ``@dynamic mf `` e.g `@dynamic mf 10 0` The others are not parsed for now. I will do that soon.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Dec 21, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 21, 2025 08:24
Co-authored-by: LeeGoDamn <243561453+LeeGoDamn@users.noreply.github.com>
Co-authored-by: LeeGoDamn <243561453+LeeGoDamn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix filter rule string display in cge-tools Add PolarPixellate and MosaicBlur to filter rule parser Dec 21, 2025
Copilot AI requested a review from LeeGoDamn December 21, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule string for filters not shown in cge-tools

2 participants