PictureDecoder.DecodeJpeg Method (Stream, Int32, Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Decodes a JPEG file into a WriteableBitmap object, with parameters for setting the maximum height and width of the output.

Namespace:  Microsoft.Phone
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Shared Function DecodeJpeg ( _
    source As Stream, _
    maxPixelWidth As Integer, _
    maxPixelHeight As Integer _
) As WriteableBitmap
public static WriteableBitmap DecodeJpeg(
    Stream source,
    int maxPixelWidth,
    int maxPixelHeight
)

Parameters

Return Value

Type: System.Windows.Media.Imaging..::.WriteableBitmap
Returns WriteableBitmap.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

PictureDecoder Class

DecodeJpeg Overload

Microsoft.Phone Namespace