Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softeq/subsamplingscaleimageview-xamarin-android
Binding of SubsamplingScaleImageView Android library for Xamarin / .NET6 / MAUI
https://github.com/softeq/subsamplingscaleimageview-xamarin-android
android csharp dotnet6 image image-zooming library maui xamarin xamarin-android xamarin-android-binding
Last synced: 14 days ago
JSON representation
Binding of SubsamplingScaleImageView Android library for Xamarin / .NET6 / MAUI
- Host: GitHub
- URL: https://github.com/softeq/subsamplingscaleimageview-xamarin-android
- Owner: Softeq
- License: mit
- Created: 2019-12-03T12:39:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-27T23:13:01.000Z (about 2 years ago)
- Last Synced: 2024-11-29T02:33:36.775Z (2 months ago)
- Topics: android, csharp, dotnet6, image, image-zooming, library, maui, xamarin, xamarin-android, xamarin-android-binding
- Homepage: https://github.com/davemorrissey/subsampling-scale-image-view
- Size: 2.48 MB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Subsampling Scale Image View
[![Build Status](https://dev.azure.com/SofteqDevelopment/Xamarin.Binding.Libraries/_apis/build/status/SubsamplingScaleImageView%20Android%20Library/SubsamplingScaleImageView-dev?branchName=master)](https://dev.azure.com/SofteqDevelopment/Xamarin.Binding.Libraries/_build/latest?definitionId=425&branchName=master) [![NuGet Badge](https://buildstats.info/nuget/SubsamplingScaleImageViewBinding)](https://www.nuget.org/packages/SubsamplingScaleImageViewBinding/)
Xamarin binding library for [SubsamplingScaleImageView](https://github.com/davemorrissey/subsampling-scale-image-view) Android library.
---
A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) without OutOfMemoryErrors. 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 original wiki](https://github.com/davemorrissey/subsampling-scale-image-view/wiki/02.-Displaying-images).
## Installation
NuGet:
```
Install-Package SubsamplingScaleImageViewBinding
```The minimum SDK is now 14.
## Usage
**1)** Add the view to your layout XML.
```xml
```
**2)** Now, in your fragment or activity, set the image resource, asset name or file path.
```cs
var imageView = view.FindViewById(Resource.Id.imageView);imageView.SetImage(ImageSource.ForResource(Resource.Drawable.swissroad));
```## Integration
### FFImageLoading
Use FFImageLoading [custom ViewTarget declaration](https://github.com/luberda-molinet/FFImageLoading/wiki/Custom-ViewTarget):
```cs
public class SubsamplingScaleImageViewTarget : ViewTarget
{
public SubsamplingScaleImageViewTarget(SubsamplingScaleImageView imageView)
: base(imageView)
{
}public override void Set(IImageLoaderTask task, SelfDisposingBitmapDrawable image,
bool animated)
{
var source = ImageSource.ForBitmap(image.Bitmap);
Control.SetImage(source);
}
}
``````cs
var target = new SubsamplingScaleImageViewTarget(_imageView);ImageService.Instance.LoadUrl("image-url").IntoAsync(target);
```## About
This project is maintained by [Softeq Development Corp.](https://www.softeq.com/)
We specialize in developing mobile applications using Xamarin and native technology stack.
## License
SubsamplingScaleImageViewBinding library for android is released under the MIT license. See [LICENSE](LICENSE) for details.
The original SubsamplingScaleImageView project was created by Dave Morrissey under a different [license](https://github.com/davemorrissey/subsampling-scale-image-view/blob/master/LICENSE) (Apache License 2.0)