* Updated H2 headings for US-1889327. * Review edits. * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]>
1.9 KiB
title, description, ms.date, ms.custom, dev_langs, helpviewer_keywords, ms.assetid
| title | description | ms.date | ms.custom | dev_langs | helpviewer_keywords | ms.assetid | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| How to: Encode and Decode a GIF Image | Learn how to Encode and Decode a GIF image. | 03/30/2017 | devdivchpfy22 |
|
|
9cdd9ec7-71eb-444b-b9e3-991958461163 |
How to: Encode and Decode a GIF Image
The following examples show how to decode and encode a Graphics Interchange Format (GIF) image using the specific xref:System.Windows.Media.Imaging.GifBitmapDecoder and xref:System.Windows.Media.Imaging.GifBitmapEncoder objects.
Decode a GIF image
This example demonstrates how to decode a GIF image using a xref:System.Windows.Media.Imaging.GifBitmapDecoder from a xref:System.IO.FileStream.
[!code-cppGifBitmapDecoderEncoder#1] [!code-csharpGifBitmapDecoderEncoder#1] [!code-vbGifBitmapDecoderEncoder#1]
Encode a GIF image
This example demonstrates how to encode a xref:System.Windows.Media.Imaging.BitmapSource into a GIF image using a xref:System.Windows.Media.Imaging.GifBitmapEncoder.
[!code-cppGifBitmapDecoderEncoder#4] [!code-csharpGifBitmapDecoderEncoder#4] [!code-vbGifBitmapDecoderEncoder#4]