All Projects β†’ mike14u β†’ Croperino

mike14u / Croperino

Licence: mit
πŸ“· A simple image cropping tool that provides gallery or camera help for Native Android (Java)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Croperino

Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (+165.34%)
Mutual labels:  camera, crop, gallery
Album
πŸ‰ Album and Gallery for Android platform.
Stars: ✭ 2,430 (+1280.68%)
Mutual labels:  camera, image, gallery
V Viewer
Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
Stars: ✭ 1,776 (+909.09%)
Mutual labels:  image, gallery
Imageslideshow
Swift image slideshow with circular scrolling, timer and full screen viewer
Stars: ✭ 1,612 (+815.91%)
Mutual labels:  image, gallery
Ucrop
Image Cropping Library for Android
Stars: ✭ 11,003 (+6151.7%)
Mutual labels:  image, crop
Lipo
πŸ‘„ Free image manipulation API service built on top of Sharp (an alternative to Jimp, Graphics Magic, Image Magick, and PhantomJS)
Stars: ✭ 101 (-42.61%)
Mutual labels:  image, crop
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+692.05%)
Mutual labels:  image, crop
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+860.23%)
Mutual labels:  image, crop
Nova Advanced Image Field
πŸŒ„πŸ“ A Laravel Nova advanced image field with cropping and resizing using Cropper.js and Intervention Image
Stars: ✭ 67 (-61.93%)
Mutual labels:  image, crop
React Avatar Editor
Small avatar & profile picture component. Resize and crop uploaded images using a intuitive user interface.
Stars: ✭ 1,846 (+948.86%)
Mutual labels:  image, crop
Mergi
go library for image programming (merge, crop, resize, watermark, animate, ease, transit)
Stars: ✭ 127 (-27.84%)
Mutual labels:  image, crop
Pictureselectorlight
Picture Selector Library for Android or 图片选择器
Stars: ✭ 145 (-17.61%)
Mutual labels:  camera, image
Rximagepicker
Androidε›Ύη‰‡η›Έε†Œι’„θ§ˆι€‰ζ‹©ε™¨γ€ζ”―ζŒAndroidXοΌŒζ”―ζŒε›Ύη‰‡ηš„ε•ι€‰γ€ε€šι€‰γ€ε›Ύη‰‡ι’„θ§ˆγ€ε›Ύη‰‡ζ–‡δ»Άε€Ήεˆ‡ζ’γ€εœ¨ι€‰ζ‹©ε›Ύη‰‡ζ—Άθ°ƒη”¨η›ΈζœΊζ‹η…§
Stars: ✭ 85 (-51.7%)
Mutual labels:  camera, image
Docker Nginx Image Proxy
on the fly image cropping with gravity, resize and compression microservice
Stars: ✭ 79 (-55.11%)
Mutual labels:  image, crop
Flutter crop
Crop any widget/image in Android, iOS, Web and Desktop with fancy and customizable UI, in pure Dart code.
Stars: ✭ 107 (-39.2%)
Mutual labels:  image, crop
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (-60.8%)
Mutual labels:  camera, image
Xzoom
jQuery Zoom Gallery plugin
Stars: ✭ 120 (-31.82%)
Mutual labels:  image, gallery
Gimage
A PHP library for easy image handling. πŸ–Ό
Stars: ✭ 148 (-15.91%)
Mutual labels:  image, crop
Extended image
A powerful official extension library of image, which support placeholder(loading)/ failed state, cache network, zoom pan image, photo view, slide out page, editor(crop,rotate,flip), paint custom etc.
Stars: ✭ 1,021 (+480.11%)
Mutual labels:  image, crop
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+508.52%)
Mutual labels:  image, gallery

Croperino

A simple image cropping tool for your android applications (v1.1.8)

Android Arsenal Android Arsenal Android Arsenal

Supported SDK and Gradle Version:

  • Minimum SDK Version 14
  • Target SDK Version 28
  • Gradle 3.2.1

Features:

  • Camera and/or gallery calls.
  • Face recoginition
  • Cropping of Image based on Scale (Aspect Ratio)
  • Customizing button and background
  • Performance and compression improvements

Getting Started

Make sure to have Android Studio

Gradle

repositories {
    maven { url "https://jitpack.io" }
}
implementation 'com.github.mike14u:croperino:1.1.8'

Usage

Android Manifest

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Sample Usage

//Initialize on every usage
new CroperinoConfig("IMG_" + System.currentTimeMillis() + ".jpg", "/MikeLau/Pictures", "/sdcard/MikeLau/Pictures");
    CroperinoFileUtil.verifyStoragePermissions(MainActivity.this);
    CroperinoFileUtil.setupDirectory(MainActivity.this);

//Prepare Chooser (Gallery or Camera)
Croperino.prepareChooser(MainActivity.this, "Capture photo...", ContextCompat.getColor(MainActivity.this, android.R.color.background_dark));

//Prepare Camera
try {
	Croperino.prepareCamera(MainActivity.this);
} catch(Exception e) {
	e.printStackTrace;
}

//Prepare Gallery
Croperino.prepareGallery(MainActivity.this);

onActivityResult

  • Aspect Ratio X = 1 / Y = 1 will produce fixed square view
  • Aspect Ratio X = 0 / Y = 0 will produce customizable square view width or height can be customized
  • Color and Background Color should be XML format e.g. R.color.gray, place 0 if no change is meant to colors
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    switch (requestCode) {
        case CroperinoConfig.REQUEST_TAKE_PHOTO:
            if (resultCode == Activity.RESULT_OK) {
                /* Parameters of runCropImage = File, Activity Context, Image is Scalable or Not, Aspect Ratio X, Aspect Ratio Y, Button Bar Color, Background Color */
                Croperino.runCropImage(CroperinoFileUtil.getTempFile(), MainActivity.this, true, 1, 1, R.color.gray, R.color.gray_variant);
            }
            break;
        case CroperinoConfig.REQUEST_PICK_FILE:
            if (resultCode == Activity.RESULT_OK) {
                CroperinoFileUtil.newGalleryFile(data, MainActivity.this);
                Croperino.runCropImage(CroperinoFileUtil.getTempFile(), MainActivity.this, true, 0, 0, R.color.gray, R.color.gray_variant);
            }
            break;
        case CroperinoConfig.REQUEST_CROP_PHOTO:
            if (resultCode == Activity.RESULT_OK) {
                Uri i = Uri.fromFile(CroperinoFileUtil.getTempFile());
                ivMain.setImageURI(i);
                //Do saving / uploading of photo method here.
                //The image file can always be retrieved via CroperinoFileUtil.getTempFile()
            }
            break;
        default:
            break;
    }
}

Proguard

-dontwarn com.mikelau.croperino.**
-keep class com.mikelau.croperino.** { *; }
-keep interface com.mikelau.croperino.** { *; }

Contributing

  1. Fork it (https://github.com/mike14u/croperino/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

The MIT License (MIT)

Copyright (c) 2016 Mike Lau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
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].