The opposite of
BitmapDecoder is a
BitmapEncoder class from the same namespace. With it, Windows Store and universal apps can create and modify images, and then save them to multiple formats. You can also write metadata values, if the target format supports it.
BitmapEncoder exposes an API that’s similar to
BitmapDecoder, or at least as similar as possible considering the different requirements of the task.
CreateAsync method forces you to choose which encoder (and therefore which codec) to use by passing in a
Guid identifying it in addition to the
IRandomAccessStream. As with
BitmapEncoder exposes several public static
Guid properties for the built-in BMP, GIF, JPEG, JPEG-XR, PNG, and TIFF encoders. ...