All Projects → maayyaannkk → ImagePicker

maayyaannkk / ImagePicker

Licence: MIT license
Android library to choose image from gallery or camera with option to compress result image

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ImagePicker

Phew
FLIF image viewer and QuickLook plugin for macOS
Stars: ✭ 74 (+1.37%)
Mutual labels:  image-viewer, image-compression
api
docs.nekos.moe/
Stars: ✭ 31 (-57.53%)
Mutual labels:  image-compression
Android-Simple-Image-Gallery
A simple implementation of an image gallery app in android
Stars: ✭ 98 (+34.25%)
Mutual labels:  image-viewer
vimiv-qt
An image viewer with vim-like keybindings
Stars: ✭ 130 (+78.08%)
Mutual labels:  image-viewer
GelbooruEnhancement
Image Viewer and Endless Scroll userscripts for Gelbooru and various other boorus
Stars: ✭ 41 (-43.84%)
Mutual labels:  image-viewer
Vudit
A file viewer for Android
Stars: ✭ 40 (-45.21%)
Mutual labels:  image-viewer
EasyAlbum
📷 A lightweight, pure-Swift library for pick up photo from your album.
Stars: ✭ 31 (-57.53%)
Mutual labels:  image-viewer
autoencoder based image compression
Autoencoder based image compression: can the learning be quantization independent? https://arxiv.org/abs/1802.09371
Stars: ✭ 21 (-71.23%)
Mutual labels:  image-compression
Pigment.O
Krita - Plugin - Color Picker and Mixer
Stars: ✭ 75 (+2.74%)
Mutual labels:  image-viewer
PixlView
Mac tool to view raw pixel data in a variety of formats
Stars: ✭ 20 (-72.6%)
Mutual labels:  image-viewer
Okuma-Reader
Online book/manga/image set/webtoon reader and library with some key features like Japanese page order, double-page view, touch gestures, multiple languages, and pre-caching of next pages.
Stars: ✭ 31 (-57.53%)
Mutual labels:  image-viewer
image-optimizer
A free and open source tool for optimizing images and vector graphics.
Stars: ✭ 740 (+913.7%)
Mutual labels:  image-compression
saccade
A sophisticated scientific image viewer for Linux with OpenGL support and synchronized viewports
Stars: ✭ 38 (-47.95%)
Mutual labels:  image-viewer
AndroidBigImage
Automatically generate a new Android application to display, zoom and scroll on a big image!
Stars: ✭ 49 (-32.88%)
Mutual labels:  image-viewer
xice7-imageKit
基于java语言实现的简单的图片处理
Stars: ✭ 23 (-68.49%)
Mutual labels:  image-compression
nimPNG
PNG (Portable Network Graphics) decoder and encoder written in Nim
Stars: ✭ 81 (+10.96%)
Mutual labels:  image-compression
react-imageViewer
React component for image displaying in full screen
Stars: ✭ 61 (-16.44%)
Mutual labels:  image-viewer
imagezero
Fast Lossless Color Image Compression Library
Stars: ✭ 49 (-32.88%)
Mutual labels:  image-compression
docker-imgproxy
🌐 An ultra fast, production-grade on-the-fly image processing web server. Designed for high throughput with Nginx caching. Powered by imgproxy.
Stars: ✭ 45 (-38.36%)
Mutual labels:  image-compression
qoix
Elixir implementation of the Quite OK Image format
Stars: ✭ 18 (-75.34%)
Mutual labels:  image-compression

ImagePicker Downloads

Android library to choose image from gallery or camera with option to compress result image.

Download Android Arsenal

Add this to your project's build.gradle

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

And add this to your module's build.gradle

dependencies {
	implementation 'com.github.maayyaannkk:ImagePicker:x.y.z'
}

change x.y.z to version in

Usage

For full example, please refer to app module

No need to request for write external storage permission, library will do that.

Crop with 1:1 aspect ratio

Start image picker activity

The simplest way to start is setup options and start the activity. Set the FLAG_CROP to crop resulting image in 1:1 aspect ratio

Intent intent = new Intent(this, ImageSelectActivity.class);
intent.putExtra(ImageSelectActivity.FLAG_COMPRESS, false);//default is true
intent.putExtra(ImageSelectActivity.FLAG_CAMERA, true);//default is true
intent.putExtra(ImageSelectActivity.FLAG_GALLERY, true);//default is true
intent.putExtra(ImageSelectActivity.FLAG_CROP, isCrop);//default is false
startActivityForResult(intent, 1213);

Receive result

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == 1213 && resultCode == Activity.RESULT_OK) {
            String filePath = data.getStringExtra(ImageSelectActivity.RESULT_FILE_PATH);
            Bitmap selectedImage = BitmapFactory.decodeFile(filePath);
            imageView.setImageBitmap(selectedImage);
        }
    }

Corner cases

throws IllegalStateException if:
-chooseFromCamera and chooseFromGallery both are false

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].