Encoding Images
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. BitmapEncoder’s 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 BitmapDecoder, BitmapEncoder exposes several public static Guid properties for the built-in BMP, GIF, JPEG, JPEG-XR, PNG, and TIFF encoders. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access