C# Class Smrf.WpfGraphicsLib.WpfImageUtil

Utility methods for working with images in WPF.
Mostrar archivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_dScreenDpi Double
m_oCachedErrorImage System.Windows.Media.Imaging.BitmapSource

Public Methods

Method Description
CreateErrorImage ( Int32 widthAndHeight ) : System.Windows.Media.Imaging.BitmapSource
GetImageSynchronous ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
GetImageSynchronousHttp ( Uri uri ) : BitmapImage
GetImageSynchronousIgnoreDpi ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
ResizeImage ( System.Windows.Media.ImageSource image, Int32 longerDimensionNew ) : System.Windows.Media.Imaging.BitmapSource
ResizeImage ( System.Windows.Media.ImageSource image, Int32 widthNew, Int32 heightNew ) : System.Windows.Media.Imaging.BitmapSource
WpfImageUtil ( ) : System

Initializes a new instance of the WpfImageUtil class.

Protected Methods

Method Description
DrawingVisualToRenderTargetBitmap ( System.Windows.Media.DrawingVisual oDrawingVisual, Int32 iWidth, Int32 iHeight ) : System.Windows.Media.Imaging.RenderTargetBitmap

Private Methods

Method Description
AssertValid ( ) : void

Method Details

CreateErrorImage() public method

public CreateErrorImage ( Int32 widthAndHeight ) : System.Windows.Media.Imaging.BitmapSource
widthAndHeight System.Int32
return System.Windows.Media.Imaging.BitmapSource

DrawingVisualToRenderTargetBitmap() protected method

protected DrawingVisualToRenderTargetBitmap ( System.Windows.Media.DrawingVisual oDrawingVisual, Int32 iWidth, Int32 iHeight ) : System.Windows.Media.Imaging.RenderTargetBitmap
oDrawingVisual System.Windows.Media.DrawingVisual
iWidth System.Int32
iHeight System.Int32
return System.Windows.Media.Imaging.RenderTargetBitmap

GetImageSynchronous() public method

public GetImageSynchronous ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
return System.Windows.Media.Imaging.BitmapSource

GetImageSynchronousHttp() public method

public GetImageSynchronousHttp ( Uri uri ) : BitmapImage
uri System.Uri
return System.Windows.Media.Imaging.BitmapImage

GetImageSynchronousIgnoreDpi() public method

public GetImageSynchronousIgnoreDpi ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
return System.Windows.Media.Imaging.BitmapSource

ResizeImage() public method

public ResizeImage ( System.Windows.Media.ImageSource image, Int32 longerDimensionNew ) : System.Windows.Media.Imaging.BitmapSource
image System.Windows.Media.ImageSource
longerDimensionNew System.Int32
return System.Windows.Media.Imaging.BitmapSource

ResizeImage() public method

public ResizeImage ( System.Windows.Media.ImageSource image, Int32 widthNew, Int32 heightNew ) : System.Windows.Media.Imaging.BitmapSource
image System.Windows.Media.ImageSource
widthNew System.Int32
heightNew System.Int32
return System.Windows.Media.Imaging.BitmapSource

WpfImageUtil() public method

Initializes a new instance of the WpfImageUtil class.
public WpfImageUtil ( ) : System
return System

Property Details

m_dScreenDpi protected_oe static_oe property

protected static Double m_dScreenDpi
return Double

m_oCachedErrorImage protected_oe property

protected BitmapSource,System.Windows.Media.Imaging m_oCachedErrorImage
return System.Windows.Media.Imaging.BitmapSource