subsampling-scale-image-view alternatives and similar packages
Based on the "ImageView Widget" category.
Alternatively, view subsampling-scale-image-view alternatives based on common mentions on social networks and blogs.
-
PhotoView
Implementation of ImageView for Android that supports zooming, by various touch gestures. -
CircleImageView
A circular ImageView for Android -
android-gpuimage
Android filters based on OpenGL (idea from GPUImage for iOS) -
android-crop
Android library project for cropping images -
cropper
Android widget for cropping and rotating an image. -
TextDrawable
This light-weight library provides images with letter/text like the Gmail app. It extends the Drawable class thus can be used with existing/custom/network ImageView classes. Also included is a fluent interface for creating drawables and a customizable ColorGenerator. -
TouchImageView
Adds touch functionality to Android ImageView. -
android-shape-imageview
Custom shaped android imageview components -
ImageViewZoom
Android ImageView widget with zoom and pan capabilities -
GestureViews
ImageView and FrameLayout with gestures control and position animation -
android-smart-image-view
Android ImageView replacement which allows image loading from URLs or contact address book, with caching -
gesture-imageview
Implements pinch-zoom, rotate, pan as an ImageView for Android 2.1+ -
CircularImageView
Custom view for circular images in Android while maintaining the best draw performance -
GifImageView
Android ImageView that handles animated GIF images -
SelectableRoundedImageView
Android ImageView that supports different radii on each corner. -
SimpleTagImageView
ImageView with a tag on android -
cropimage
Replacement for deprecated official Android crop image function -
DrawerArrowDrawable
Visual back-port of the rotating drawer-to-arrow drawable from Android L -
MovingImageView
Custom ImageView for moving image around the screen (Android) -
android-cropimage
CropImage Activity from Gallery.apk packaged as a reusable Android library (4.0 and up). -
CropImageView
Crop and Rounded Corners added to an ImageView. -
ImageGallery
A gallery used to host an array of images -
gif-movie-view
Android View widget for displaying GIF animations. -
PolygonImageView
Custom ImageView for android with polygon shape (Android) -
BadgedImageview
BadgedImageview allow you show a badge into a Imageview. -
ByakuGallery
An open source Android library that allows the visualization of large images with gesture capabilities -
DexMovingImageView
DMIV aims to provide a flexible and customizable instrument for automated images moving on display. It provides scroll, gyroscope or time based moving. But you can create your own evaluator. -
AndroidImageCrop
How select and crop image on Android -
Music Cover View
Subclass of ImageView that 'morphs' into a circle shape and can rotates. Useful to be used as album cover in Music apps. :dvd::notes: -
WaveDrawable
Drawable animation inspired by Tinder. -
avatar-android
Rounded and Squared Avatar for Android Applications -
FlickableView
Flickable ImageView for Android. It's like a view of twitter's detail image. -
Android Parallax Image View
Create parallax and any other transformation effects on scrolling android ImageView -
AvatarImageGenerator
Android library to generate image avatar from the first letter of a username. Letter avatar like Gmail Android best practice -
NoiseView
Android library written in kotlin that add a noise effect to image.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of subsampling-scale-image-view or a related project?
README
Subsampling Scale Image View
A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) without OutOfMemoryError
s. Includes pinch to zoom, panning, rotation and animation support, and allows easy extension so you can add your own overlays and touch event detection.
The view optionally uses subsampling and tiles to support very large images - a low resolution base layer is loaded and as you zoom in, it is overlaid with smaller high resolution tiles for the visible area. This avoids holding too much data in memory. It's ideal for displaying large images while allowing you to zoom in to the high resolution details. You can disable tiling for smaller images and when displaying a bitmap object. There are some advantages and disadvantages to disabling tiling so to decide which is best, see the wiki.
Guides
- Releases & downloads
- Installation and setup
- Image display notes & limitations
- Using preview images
- Handling orientation changes
- Advanced configuration
- Event handling
- Animation
- Extension
- Reference (JavaDocs)
Migration guides
Versions 3.9.0, 3.8.0 and 3.0.0 contain breaking changes. Migration instructions can be found in the wiki.
Download the sample app
[Get it on Google Play](docs/images/google_play.png)
Demo
[Demo](docs/images/demo.gif)
Features
Image display
- Display images from assets, resources, the file system or bitmaps
- Automatically rotate images from the file system (e.g. the camera or gallery) according to EXIF
- Manually rotate images in 90° increments
- Display a region of the source image
- Use a preview image while large images load
- Swap images at runtime
- Use a custom bitmap decoder
With tiling enabled:
- Display huge images, larger than can be loaded into memory
- Show high resolution detail on zooming in
- Tested up to 20,000x20,000px, though larger images are slower
Gesture detection
- One finger pan
- Two finger pinch to zoom
- Quick scale (one finger zoom)
- Pan while zooming
- Seamless switch between pan and zoom
- Fling momentum after panning
- Double tap to zoom in and out
- Options to disable pan and/or zoom gestures
Animation
- Public methods for animating the scale and center
- Customisable duration and easing
- Optional uninterruptible animations
Overridable event detection
- Supports
OnClickListener
andOnLongClickListener
- Supports interception of events using
GestureDetector
andOnTouchListener
- Extend to add your own gestures
Easy integration
- Use within a
ViewPager
to create a photo gallery - Easily restore scale, center and orientation after screen rotation
- Can be extended to add overlay graphics that move and scale with the image
- Handles view resizing and
wrap_content
layout
Quick start
1) Add this library as a dependency in your app's build.gradle file.
dependencies {
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
}
If your project uses AndroidX, change the artifact name as follows:
dependencies {
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
}
2) Add the view to your layout XML.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
3a) Now, in your fragment or activity, set the image resource, asset name or file path.
SubsamplingScaleImageView imageView = (SubsamplingScaleImageView)findViewById(id.imageView);
imageView.setImage(ImageSource.resource(R.drawable.monkey));
// ... or ...
imageView.setImage(ImageSource.asset("map.png"))
// ... or ...
imageView.setImage(ImageSource.uri("/sdcard/DCIM/DSCM00123.JPG"));
3b) Or, if you have a Bitmap
object in memory, load it into the view. This is unsuitable for large images because it bypasses subsampling - you may get an OutOfMemoryError
.
SubsamplingScaleImageView imageView = (SubsamplingScaleImageView)findViewById(id.imageView);
imageView.setImage(ImageSource.bitmap(bitmap));
Photo credits
- San Martino by Luca Bravo, via unsplash.com
- Swiss Road by Ludovic Fremondiere, via unsplash.com
About
Copyright 2018 David Morrissey, and licensed under the Apache License, Version 2.0. No attribution is necessary but it's very much appreciated. Star this project if you like it!
*Note that all licence references and agreements mentioned in the subsampling-scale-image-view README section above
are relevant to that project's source code only.