All Projects → lyft → Scissors

lyft / Scissors

Licence: apache-2.0
✂ Android image cropping library

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Labels

Projects that are alternatives of or similar to Scissors

Confidant
Confidant: your secret keeper. https://lyft.github.io/confidant
Stars: ✭ 1,666 (-10.33%)
Mutual labels:  lyft
React Javascript To Typescript Transform
Convert React JavaScript code to TypeScript with proper typing
Stars: ✭ 1,575 (-15.23%)
Mutual labels:  lyft
Libretaxi
Open source Uber #deleteuber
Stars: ✭ 3,687 (+98.44%)
Mutual labels:  lyft
gostats
Go client for Stats
Stars: ✭ 52 (-97.2%)
Mutual labels:  lyft
parallel mAP evaluation
This repo parallelizes mAP_evaluation using python's multiprocessing module.
Stars: ✭ 18 (-99.03%)
Mutual labels:  lyft
omnibot
One slackbot to rule them all
Stars: ✭ 69 (-96.29%)
Mutual labels:  lyft
lyft.github.io
This is code for oss.lyft.com website.
Stars: ✭ 13 (-99.3%)
Mutual labels:  lyft
lyft-node-sdk
Node SDK for the Lyft Public API
Stars: ✭ 15 (-99.19%)
Mutual labels:  lyft
dailycodingproblem
Solutions to Daily Coding Problem questions
Stars: ✭ 26 (-98.6%)
Mutual labels:  lyft
Cartography
Cartography is a Python tool that consolidates infrastructure assets and the relationships between them in an intuitive graph view powered by a Neo4j database.
Stars: ✭ 2,169 (+16.74%)
Mutual labels:  lyft

⚠️ This repository has been archived and is no longer accepting contributions ⚠️

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].