Bitmap allows loading an image in C1Bitmap object using the Load method of the C1Bitmap class. With Load and LoadAsync method overloads, the image can be loaded from StorageFile or IInputStream, or from System.IO.Stream. Bitmap also allows loading image metadata, which can be used to determine size of the image, its resolution (DPI), or pixel format. Additionally, several images can be loaded or imported, one by one, into the same instance of C1Bitmap.
Like loading, the image from C1Bitmap can be saved to a StorageFile or IOutputStream, and to System.IO.Stream. The Bitmap provides general Save methods in C1Bitmap class, that accept the container format as an argument. It also provides a specific SaveAs method for each of the supported container formats which has the corresponding encoder.
Here, we discuss loading an arbitrary image from a file. To load an image from a stream, refer to Quick Start.
The following steps illustrate loading an arbitrary image from a file. This code uses LoadAsync method to load an image from a StorageFile.