【问题标题】:Crop an image with special frame使用特殊框架裁剪图像
【发布时间】:2013-12-30 19:43:11
【问题描述】:

我正在为 android 编写一个应用程序。我需要实现类似下图的东西(来自 LG 的壁纸选择工具)。原图没有圆圈。

实际图像被裁剪到矩形外,但缩略图被裁剪到内圈。

我想实现这样的东西,但指南不是矩形,而是圆形。有没有这方面的示例或库?

【问题讨论】:

    标签: android image image-compression


    【解决方案1】:

    查看此库以自定义您的相机功能。希望它对你有用。

    https://github.com/edmodo/cropper

    【讨论】:

      【解决方案2】:

      请使用这个库: 这个库提供了圆形特征.. 我已经使用这个库实现了圆形裁剪......

      https://github.com/MMP-forTour/cropimage

      示例代码

      private void cropImage(String imagePath) {
          Intent intent = new Intent(context, CropImage.class);
          Log.d("imagepath", "URI= " + imagePath);
          intent.putExtra("image-path", imagePath);
          intent.putExtra("scale", true);
          intent.putExtra("circleCrop",true);  //for circular crop
          intent.putExtra("return-data", false);
          startActivityForResult(intent,REQUEST_CODE_CROP_IMAGE);
       }
      

      另一个也将图像裁剪成圆形。

      https://github.com/biokys/cropimage

      https://github.com/lvillani/android-cropimage

      https://github.com/dtitov/pickncrop

      【讨论】:

        【解决方案3】:

        我想实现同样的事情,所以我修改了edmodo cropper 以进行循环选择。看看我的图书馆CircleImageCropper

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2013-01-14
          • 1970-01-01
          • 2019-02-23
          • 1970-01-01
          • 2018-07-21
          • 1970-01-01
          • 2021-09-01
          相关资源
          最近更新 更多