简体   繁体   English

Cropper-在多边形中裁剪图像

[英]Cropper - Crop image in polygon

Is it possible, to crop an image in the form of a polygon? 是否可以以多边形形式裁剪图像? Using Cropper (A simple jQuery image cropping plugin) at fengyuanchen in Github 在Github的fengyuanchen使用Cropper(一个简单的jQuery图像裁剪插件)

Expected behavior 预期行为

I have a image to crop with Cropper, and I want to crop into 6 sides. 我有要使用Cropper裁剪的图像,并且想裁剪为6面。 Hexagon. 六边形。 See attached. 见附件。

Hexagon image: 六角形图片:
六角形图像

Well, I know it's possible to crop rounded, is soft. 好吧,我知道裁剪是可能的,很柔软。 But for five or six sides is hard. 但是对于五六面来说,很难。 anybody some idea, for work? 有人对工作有想法吗?

I don't have any knowledge regarding this but A hexagon can be made by rotating a rectangle at an axis 2 times at 60 degrees. 我对此一无所知,但可以通过将一个矩形在60度旋转2次来制作一个六边形。 Crop the rectangle with your dimensions and then rotate your rectangle at 60 degrees and crop again and then rotate your rectangle at 60 degrees and crop again. 裁剪具有尺寸的矩形,然后将矩形旋转60度并再次裁剪,然后将矩形旋转60度并再次裁剪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM