SwiftyCrop icon indicating copy to clipboard operation
SwiftyCrop copied to clipboard

希望可以修改裁剪框的颜色

Open huawuying opened this issue 2 months ago • 5 comments

如果图片是纯黑色就看不见裁剪框了 像图片这样 Image

huawuying avatar Oct 24 '25 03:10 huawuying

Hi @huawuying,

using the SwiftyCropConfiguration and adjusting the colors, you can change the background color of the cropping view. Maybe you can try this and use a lighter color?

benedom avatar Oct 24 '25 08:10 benedom

感谢回答,我尝试修改了背景颜色,如果用浅色背景,遇到浅色图片也会有类似问题。所以我希望可以修改裁剪框的颜色,这样背景和裁剪结合可以明显区分裁剪区域。

huawuying avatar Oct 31 '25 06:10 huawuying

Hi @huawuying please check out https://github.com/benedom/SwiftyCrop/tree/feature/crop-mask-color and use the new color setting for cropOuterMask. Does this solve your issue?

benedom avatar Nov 05 '25 09:11 benedom

感谢你的修改,我设置了cropOuterMask颜色确实可以明显看到裁剪区域了。

Image 如果能修改裁剪框边框颜色就更完美了,视觉上应该更好看一些

huawuying avatar Nov 07 '25 03:11 huawuying

Hi @huawuying I just updated the branch again. Please check if this is fine for your use case!

benedom avatar Nov 19 '25 13:11 benedom