当前位置: 首页>>代码示例>>C#>>正文


C# UIImage.SaveToPhotosAlbum方法代码示例

本文整理汇总了C#中UIKit.UIImage.SaveToPhotosAlbum方法的典型用法代码示例。如果您正苦于以下问题:C# UIImage.SaveToPhotosAlbum方法的具体用法?C# UIImage.SaveToPhotosAlbum怎么用?C# UIImage.SaveToPhotosAlbum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIKit.UIImage的用法示例。


在下文中一共展示了UIImage.SaveToPhotosAlbum方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SavePictureToDisk

 public async void SavePictureToDisk(string photoPath)
 {
     var someImage = new UIImage(photoPath);
     someImage.SaveToPhotosAlbum((image, error) => {
         var o = image;
      });
 }
开发者ID:dimgrek,项目名称:PrivatePhotoStorageXamarin,代码行数:7,代码来源:AppDelegate.cs

示例2: SavePictureToDisk

		public async void SavePictureToDisk (String photoPath)
		{
			UIImage someImage = new UIImage (photoPath);
			someImage.SaveToPhotosAlbum ((image, error) => {
				var o = image as UIImage;
				//				Console.WriteLine ("Photo saved.");
			});
		}
开发者ID:Exis19ce,项目名称:SecretGallery,代码行数:8,代码来源:AppDelegate.cs

示例3: doTakeSnapshot

		partial void doTakeSnapshot (UIBarButtonItem sender)
		{
			UIImage img = new UIImage (flexPie.GetImage ());
			img.SaveToPhotosAlbum ((image, error) => {
				if (error == null)
					new UIAlertView ("Success", "Image was saved to Camera Roll succesfully", null, "OK", null).Show ();
				else
					new UIAlertView ("Failure", error.Description, null, "OK", null).Show ();
			});
		}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:10,代码来源:SnapshotController.cs

示例4: saveImageToGallery

        /*
         * saves an image taken with the camera to the users gallery
         * 
         * Params:
         * string fileName: the file name to save the image under
         * byte[] imageBytes: a byte array of the image data
         * 
         * Returns:
         * a string message indicating if the save was successful or failed
         */ 
        public String saveImageToGallery(string fileName, byte[] imageBytes)
        {
            var message = "";
            var imageToSave = new UIImage(NSData.FromArray(imageBytes));
            imageToSave.SaveToPhotosAlbum((image, error) =>
            {
                if (error != null)
                {
                     message = "error";
                }
            });

            return message;
        }
开发者ID:DawnMeh,项目名称:WDGS,代码行数:24,代码来源:SaveAndLoadFilesiOS.cs

示例5: CapturePhoto

		async void CapturePhoto ()
		{
			var videoConnection = stillImageOutput.ConnectionFromMediaType (AVMediaType.Video);
			var sampleBuffer = await stillImageOutput.CaptureStillImageTaskAsync (videoConnection);
			var jpegImage = AVCaptureStillImageOutput.JpegStillToNSData (sampleBuffer);

			var photo = new UIImage (jpegImage);
			photo.SaveToPhotosAlbum ((image, error) => {
				Console.Error.WriteLine (@"				Error: ", error);
			});
		}
开发者ID:ChandrakanthBCK,项目名称:xamarin-forms-samples,代码行数:11,代码来源:CameraPageRenderer.cs

示例6: SaveUiImageToGallery

 public void SaveUiImageToGallery(UIImage source)
 {
     source.SaveToPhotosAlbum((image, error) => {
         Console.WriteLine("error:" + error);
     });
 }
开发者ID:dimgrek,项目名称:TabbedAppXamarin,代码行数:6,代码来源:SaveImageService.cs


注:本文中的UIKit.UIImage.SaveToPhotosAlbum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。