←Select platform

SaveAsync(RasterImage,Uri,RasterImageFormat,int,object) Method

Summary

Saves a RasterImage to a remote URL in any of the supported compressed or uncompressed formats asynchronously.

Syntax
C#
C++/CLI
Python
public void SaveAsync( 
   RasterImage image, 
   Uri uri, 
   RasterImageFormat format, 
   int bitsPerPixel, 
   object userState 
) 
public:  
   void SaveAsync( 
      RasterImage^ image, 
      System::Uri^ uri, 
      RasterImageFormat^ format, 
      int bitsPerPixel, 
      Object^ userState 
   ) 
def SaveAsync(self,image,uri,format,bitsPerPixel,userState): 

Parameters

image

The RasterImage object that holds the image data.

uri

The System.Uri containing the output URL name.

format

The output file format. For valid values,

Summary of All Supported File Formats.

bitsPerPixel

Resulting file's pixel depth. Note that not all bits per pixel are

available to all file formats. For valid values, refer to Summary of All Supported File Formats. If

bitsPerPixel is 0, the image will be stored using the closest bits/pixel value supported by that format. For example, if a file format supports 1, 4, and 24 bits/pixel, and RasterImage.BitsPerPixel is 5, the file will be stored as 24 bit. Likewise, if RasterImage.BitsPerPixel is 2, the file will be stored as 4 bit.

userState

A user-defined object that is passed to the method invoked when the asynchronous operation completes.

Remarks

NOTE: This topic is part of RasterCodecs Async support using the .NET System.ComponentMode.AsyncOperation model. For .NET async/await, use Task<bool> SaveAsync(RasterImage image, ILeadStream stream, RasterImageFormat format, int bitsPerPixel).

The SaveAsyncCompleted event will occur when the RasterCodecs finishes saving the image.

For general information on saving images using RasterCodecs, refer to Save.

Requirements

Target Platforms

Help Version 22.0.2023.5.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.