ios-gpuimage-plus icon indicating copy to clipboard operation
ios-gpuimage-plus copied to clipboard

Add Image Deform/Liquify feature to iOS demo, aligning with Android version

Open Copilot opened this issue 3 months ago • 1 comments

Adds the interactive image deformation (liquify) feature to iOS, matching the Android version's ImageDeformActivity. The iOS library already had the C++ CGELiquidationFilter implementation but lacked the Objective-C wrapper and demo UI.

Changes

Library

  • CGEDeformFilterWrapper (cge/interfaces/) - Objective-C wrapper for CGELiquidationFilter
    • Forward, bloat, wrinkle, restore deformation modes
    • Undo/redo with configurable step limit
    • Mesh visualization toggle
    • Input validation on creation
  • Updated cge.h umbrella headers to export the new wrapper

Demo

  • ImageDeformViewController - Touch-based deformation demo
    • Pan gesture for real-time mesh manipulation
    • Mode selection (Forward/Bloat/Wrinkle/Restore)
    • Adjustable radius and intensity
    • Gallery integration and save functionality
  • Added "Image Deform Demo" entry to Main.storyboard

Documentation

  • Updated README with feature list and usage example

Usage

#import "cgeDeformFilterWrapper.h"

CGEDeformFilterWrapper* wrapper = [CGEDeformFilterWrapper createWithWidth:1280 
                                                                   height:720 
                                                                   stride:10.0f];
[wrapper setUndoSteps:50];

// Forward deform (push pixels)
[wrapper forwardDeformWithStartX:100 startY:100 endX:150 endY:150 
                           width:canvasWidth height:canvasHeight 
                          radius:100.0f intensity:0.15f];

// Undo/redo
if ([wrapper canUndo]) [wrapper undo];

Manual Step Required

Add new files to Xcode projects:

  • cgeDeformFilterWrapper.h/mmcgeFramework.xcodeproj
  • ImageDeformViewController.h/mmcgeDemo.xcodeproj
Original prompt

任务: 帮我迭代这个项目, 对齐安卓版本 https://github.com/wysaid/android-gpuimage-plus/ 的液化功能。 描述:本项目有一段时间没有迭代了, 功能已经落后了安卓版本较多。 请审查本项目与安卓版本项目的差异, 帮我补全功能(尤其是 Demo 展示这块) 目前安卓版已经有一个单独的页面用于展示液化相关的功能。 重点关注一下这个功能。 开发完毕之后, 也顺便更新一下项目的描述


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

Copilot avatar Nov 28 '25 07:11 Copilot

[!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.

coderabbitai[bot] avatar Nov 28 '25 07:11 coderabbitai[bot]