icapps / flutter-custom-image-crop

A flutter package to support a customizable image cropper.
MIT License
43 stars 38 forks source link

[Feature request] create tool to generate Custom paths. #37

Open sikandernoori opened 1 year ago

sikandernoori commented 1 year ago

Core concept is to generate Path based on Custom shapes, Alphabets, numbers, Tree, logo etc.

Sample: https://www.mockofun.com/wp-content/uploads/2019/12/crop-pictures-into-shapes.jpg

ikbendewilliam commented 1 year ago

I think this might be a bit much for this package to create a tool for those type of shapes 😅.

That being said, you might be able to create a similar effect based on a mask 🤔 What you would do is first draw the mask (any image), then draw the to-crop image and use Paint()..blendMode = BlendMode.srcIn which should then only draw where the mask has pixels. Feel free to experiment with it and create a PR for this 🙂. I don't have much time for this atm, but if there are more poeple that need this I can look at it.

sikandernoori commented 1 year ago

Thanks for suggestions, not a requirement ATM, just had this idea, will implement myself in near future. Than maybe you can add in readme for users.

With drawPath option in plugin it's more flexible to achieve such solution.

ikbendewilliam commented 1 year ago

If you create a tool for this, I'd be happy to add it to the readme, keep us posted 😁