All Projects → muak → Xamarin.Plugin.ImageEdit

muak / Xamarin.Plugin.ImageEdit

Licence: MIT license
Image Edit Plugin for Xamarin

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to Xamarin.Plugin.ImageEdit

XamarinHOL
Xamarin ハンズオン用のレポジトリ&ドキュメントです。
Stars: ✭ 52 (+0%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
XamSvg-Samples
Samples for Xamarin Svg enterprise cross platform and full featured Svg image control
Stars: ✭ 25 (-51.92%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Plugin.audiorecorder
Audio Recorder plugin for Xamarin and Windows
Stars: ✭ 140 (+169.23%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
UITestSampleApp
A sample app to demonstrate how to create Xamarin UITests using the Page Object architecture, Backdoor Methods and App Links (aka Deep Linking)
Stars: ✭ 38 (-26.92%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
LaunchMapsPlugin
Launch External Maps Plugin for Xamarin and Windows
Stars: ✭ 49 (-5.77%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xamarin Docs
Xamarin Documentation - public content repo
Stars: ✭ 136 (+161.54%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xamarin Playground
Random cool stuff I play around using Xamarin.. :3 Some of these cool projects I feature them on my blog, with step by step explanation. :) Don't forget to check it out. Go to: theconfuzedsourcecode.wordpress.com
Stars: ✭ 183 (+251.92%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xaml Code Experiences
A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.
Stars: ✭ 114 (+119.23%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Cognitive-Face-Xamarin
A client library that makes it easy to work with the Microsoft Cognitive Services Face API on Xamarin.iOS, Xamarin.Android, and Xamarin.Forms and/or Portable Class Libraries.
Stars: ✭ 18 (-65.38%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Microsoft.maui.graphics
Stars: ✭ 160 (+207.69%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
WheelPicker-Samples
WheelPicker samples for the WheelPicker Xamarin Component
Stars: ✭ 18 (-65.38%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
SKOR.UI
UI Controls for Xamarin.Forms
Stars: ✭ 56 (+7.69%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Connectivityplugin
Connectivity Plugin for Xamarin and Windows
Stars: ✭ 253 (+386.54%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xamarin Demos
This repository contains the Syncfusion Xamarin UI control’s samples and the guide to use them.
Stars: ✭ 218 (+319.23%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Arcgis Toolkit Dotnet
Toolkit for ArcGIS Runtime SDK for .NET
Stars: ✭ 125 (+140.38%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xamarin.forms.videoplayer
A Xamarin Forms control to render the native video player on every platform.
Stars: ✭ 140 (+169.23%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Xamuidemo
Xamarin Forms Login Page UI Kit
Stars: ✭ 82 (+57.69%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Ffimageloading
Image loading, caching & transforming library for Xamarin and Windows
Stars: ✭ 1,288 (+2376.92%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Simpleauth
The Simplest way to Authenticate and make Rest API calls in .Net
Stars: ✭ 148 (+184.62%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Improvexamarinbuildtimes
Tips and tricks on how to speed up the time it takes to compile a Xamarin app
Stars: ✭ 180 (+246.15%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android

Image Edit Plugin for Xamarin

This plugin will enable you to manipulate(resize,crop,rotate) and filter(monochrome) a image(png,jpg).

Setup

Install-Package Xamarin.Plugin.ImageEdit

Platform Support

Platform Supported Version
Xamarin.iOS Yes iOS 9+
Xamarin.Android Yes API 22+
Windows 10 UWP No
Xamarin.Mac No

Usage example

Image crop and rotate and resize and get png data.

Using as plugin

using (var image = await CrossImageEdit.Current.CreateImageAsync(imageByteArray)) {
	var croped = await Task.Run(() =>
			image.Crop(10, 20, 250, 100)
				 .Rotate(180)
				 .Resize(100, 0)
				 .ToPng()
	);
}

Using as IPlatformInitializer(prism.unity.forms)

//View model constructor
public ViewModel(IImageEdit imageEdit){

	using (var image = await imageEdit.CreateImageAsync(imageByteArray)) {
		var croped = await Task.Run(() =>
				image.Crop(10, 20, 250, 100)
					 .Rotate(180)
					 .Resize(100, 0)
					 .ToPng()
		);
	}
}


//on platform
public class iOSInitializer : IPlatformInitializer
{
	public void RegisterTypes(IUnityContainer container)
	{
		container.RegisterType<IImageEdit,ImageEdit>();
	}
}

Sample project

https://github.com/muak/PanPinchSample

movie https://twitter.com/muak_x/status/837266085405573120

API Usage

Get EditableImage

//from byte[]
var image = await CrossImageEdit.Current.CreateImageAsync(imageByteArray);
//from stream
var image = await CrossImageEdit.Current.CreateImageAsync(imageStream);

It is able to manipulate a image using this object.

Resize

var width = 200;
var height = 150;
image.Resize(width, height);
image.Resize(width, 0); //auto height
image.Resize(0, height); //auto width

image.Resize(50); //specify max length of long side. other side auto size.

Crop

var x = 10;
var y = 10;
var width = 50;
var height = 50;
image.Crop(10, 10, 50, 50);

Rotate

var degree = 90; // 0-360;
image.Rotate(degree);

ToMonochrome

The image will convert to monochrome.

image.ToMonochrome();

ToPng

var pngBytes = image.ToPng();

ToJpeg

var jpgBytes = image.ToJpeg(90); // quality(0-100)

ToArgbPixels

Get image ARGB infomation.

for example when 0xFF00F090

A R G B
FF 00 F0 90
var pixels = image.ToArgbPixels();

var pixel = pixels[10];
var r = pixel & 0x00FF0000 >> 16; //Get R
var g = pixel & 0x0000FF00 >> 8;  //Get G
var b = pixel & 0x000000FF;       //Get B

GetNativeImage

Get native image on platform. if platform is iOS, return UIImage; otherwise return Bitmap.

License

MIT Licensed.

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