PngInterlaceOption Enumeration
.NET Framework 3.0
Specifies whether a Portable Network Graphics (PNG) format image is interlaced during encoding.
Namespace: System.Windows.Media.Imaging
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Interlace
Imaging-How-to Topics
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Interlacing refers to the process of displaying a PNG frame in two fields. One field contains the even lines of the frame, while the other field contains the odd lines of the frame. When the PNG is viewed, the lines in one field are displayed first, and then the lines in the second field are displayed.
The following example demonstrates how to use the Interlace property of the PngBitmapEncoder class.
Dim stream As New FileStream("new.png", FileMode.Create) Dim encoder As New PngBitmapEncoder() Dim myTextBlock As New TextBlock() myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString() encoder.Interlace = PngInterlaceOption.On encoder.Frames.Add(BitmapFrame.Create(image)) encoder.Save(stream)
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Reference
System.Windows.Media.Imaging NamespaceInterlace
Other Resources
Imaging OverviewImaging-How-to Topics
Community Additions
ADD
Show: