scissors

✂ Android image cropping library

Github星跟踪图

Scissors

Fixed viewport image cropping library for Android with built-in support for Picasso, Glide or Universal Image Loader.

Usage

See scissors-sample.

  • Include it on your layout:
<com.lyft.android.scissors.CropView
    android:id="@+id/crop_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:cropviewViewportRatio="1"
    />
  • Set a Bitmap to be cropped. In example by calling cropView.setImageBitmap(someBitmap);
  • Call Bitmap croppedBitmap = cropView.crop(); to obtain a cropped Bitmap to match viewport dimensions

Extensions

Scissors comes with handy extensions which help with common tasks like:

Loading a Bitmap

To load a Bitmap automatically with Picasso, Glide or Universal Image Loader into CropView use as follows:

cropView.extensions()
    .load(galleryUri);

Cropping into a File

To save a cropped Bitmap into a File use as follows:

cropView.extensions()
    .crop()
    .quality(87)
    .format(PNG)
    .into(croppedFile))

Questions

For questions please use github issues. Mark question issue with "question" label.

Download

compile 'com.lyft:scissors:1.1.1'

Snapshots of development version are available in Sonatype's snapshots repository.

License

Copyright (C) 2015 Lyft, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contributing

Please see CONTRIBUTING.md.

Contributors

主要指标

概览
名称与所有者lyft/scissors
主编程语言Java
编程语言Shell (语言数: 2)
平台
许可证Apache License 2.0
所有者活动
创建于2015-11-18 02:06:10
推送于2021-10-08 22:16:47
最后一次提交2021-10-08 15:16:46
发布数6
最新版本名称1.1.1 (发布于 2016-07-21 11:30:28)
第一版名称1.0.0 (发布于 2015-11-17 18:51:01)
用户参与
星数1.8k
关注者数260
派生数234
提交数66
已启用问题?
问题数57
打开的问题数0
拉请求数30
打开的拉请求数0
关闭的拉请求数18
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?